没有合适的资源?快使用搜索试试~ 我知道了~
首页Java APIs, Extensions and Libraries, 2nd Edition--2018
Java APIs, Extensions and Libraries, 2nd Edition--2018
需积分: 6 7 下载量 58 浏览量
更新于2023-05-26
收藏 9.68MB PDF 举报
Extend your Java skills beyond the fundamental object-oriented concepts and core language features Apply Java Swing for building Java front ends Get started with Java network programming Connect to databases and access data from Java programs using the JDBC API Work with JavaFX, RMI (Remote Method Invocation), and JNI (Java Native Interface) Use the new scripting features of Java
资源详情
资源推荐
![](https://csdnimg.cn/release/download_crawler_static/10332128/bg3.jpg)
Java APIs, Extensions and Libraries: With JavaFX, JDBC, jmod, jlink, Networking, and the Process API
Kishori Sharan
Montgomery, Alabama, USA
ISBN-13 (pbk): 978-1-4842-3545-4 ISBN-13 (electronic): 978-1-4842-3546-1
https://doi.org/10.1007/978-1-4842-3546-1
Library of Congress Control Number: 2018939410
Copyright © 2018 by Kishori Sharan
This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or part of the
material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation,
broadcasting, reproduction on microfilms or in any other physical way, and transmission or information storage
and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now known or
hereafter developed.
Trademarked names, logos, and images may appear in this book. Rather than use a trademark symbol with
every occurrence of a trademarked name, logo, or image we use the names, logos, and images only in an
editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark.
The use in this publication of trade names, trademarks, service marks, and similar terms, even if they are
not identified as such, is not to be taken as an expression of opinion as to whether or not they are subject to
proprietary rights.
While the advice and information in this book are believed to be true and accurate at the date of publication,
neither the authors nor the editors nor the publisher can accept any legal responsibility for any errors or
omissions that may be made. The publisher makes no warranty, express or implied, with respect to the material
contained herein.
Managing Director, Apress Media LLC: Welmoed Spahr
Acquisitions Editor: Steve Anglin
Development Editor: Matthew Moodie
Coordinating Editor: Mark Powers
Cover designed by eStudioCalamar
Cover image designed by Freepik (www.freepik.com)
Distributed to the book trade worldwide by Springer Science+Business Media New York,
233 Spring Street, 6th Floor, New York, NY 10013. Phone 1-800-SPRINGER, fax (201) 348-4505, e-mail
orders-ny@springer-sbm.com, or visit www.springeronline.com. Apress Media, LLC is a California LLC
and the sole member (owner) is Springer Science + Business Media Finance Inc (SSBM Finance Inc).
SSBM Finance Inc is a Delaware corporation.
For information on translations, please e-mail editorial@apress.com; for reprint, paperback, or audio
rights, please email bookpermissions@springernature.com.
Apress titles may be purchased in bulk for academic, corporate, or promotional use. eBook versions and
licenses are also available for most titles. For more information, reference our Print and eBook Bulk Sales web
page at http://www.apress.com/bulk-sales.
Any source code or other supplementary material referenced by the author in this book is available to readers
on GitHub via the book’s product page, located at www.apress.com/9781484235454. For more detailed
information, please visit http://www.apress.com/source-code.
Printed on acid-free paper
www.allitebooks.com
![](https://csdnimg.cn/release/download_crawler_static/10332128/bg4.jpg)
iii
Contents
About the Author ���������������������������������������������������������������������������������������������������xvii
About the Technical Reviewer ��������������������������������������������������������������������������������xix
Acknowledgments ��������������������������������������������������������������������������������������������������xxi
Introduction ����������������������������������������������������������������������������������������������������������xxiii
■Chapter 1: Introduction to Swing �������������������������������������������������������������������������� 1
What Is Swing? ���������������������������������������������������������������������������������������������������������������� 2
The Simplest Swing Program ������������������������������������������������������������������������������������������� 3
Components of a JFrame ������������������������������������������������������������������������������������������������� 7
Adding Components to a JFrame ������������������������������������������������������������������������������������� 9
Some Utility Classes ������������������������������������������������������������������������������������������������������� 13
The Point Class ������������������������������������������������������������������������������������������������������������������������������������� 13
The Dimension Class ���������������������������������������������������������������������������������������������������������������������������� 13
The Insets Class ������������������������������������������������������������������������������������������������������������������������������������ 14
The Rectangle Class ����������������������������������������������������������������������������������������������������������������������������� 14
Layout Managers ������������������������������������������������������������������������������������������������������������ 15
FlowLayout �������������������������������������������������������������������������������������������������������������������������������������������16
BorderLayout ����������������������������������������������������������������������������������������������������������������������������������������21
CardLayout��������������������������������������������������������������������������������������������������������������������������������������������24
BoxLayout ��������������������������������������������������������������������������������������������������������������������������������������������� 26
GridLayout �������������������������������������������������������������������������������������������������������������������������������������������� 31
GridBagLayout �������������������������������������������������������������������������������������������������������������������������������������� 33
SpringLayout ���������������������������������������������������������������������������������������������������������������������������������������� 51
GroupLayout ����������������������������������������������������������������������������������������������������������������������������������������� 59
The null Layout Manager ���������������������������������������������������������������������������������������������������������������������� 68
www.allitebooks.com
![](https://csdnimg.cn/release/download_crawler_static/10332128/bg5.jpg)
■ Contents
iv
Creating a Reusable JFrame ������������������������������������������������������������������������������������������ 70
Event Handling ��������������������������������������������������������������������������������������������������������������� 72
Handling Mouse Events �������������������������������������������������������������������������������������������������� 79
Summary ������������������������������������������������������������������������������������������������������������������������ 82
■Chapter 2: Swing Components ���������������������������������������������������������������������������� 85
What Is a Swing Component? ���������������������������������������������������������������������������������������� 85
JButton ��������������������������������������������������������������������������������������������������������������������������� 90
JPanel����������������������������������������������������������������������������������������������������������������������������� 95
JLabel ����������������������������������������������������������������������������������������������������������������������������� 96
Text Components ������������������������������������������������������������������������������������������������������������ 97
JTextComponent ��������������������������������������������������������������������������������������������������������������������������������� 100
JTextField�������������������������������������������������������������������������������������������������������������������������������������������� 102
JPasswordField ����������������������������������������������������������������������������������������������������������������������������������107
JFormattedTextField ��������������������������������������������������������������������������������������������������������������������������� 108
JTextArea �������������������������������������������������������������������������������������������������������������������������������������������� 111
JEditorPane ���������������������������������������������������������������������������������������������������������������������������������������� 114
JTextPane ������������������������������������������������������������������������������������������������������������������������������������������� 119
Validating Text Input ����������������������������������������������������������������������������������������������������� 127
Making Choices ������������������������������������������������������������������������������������������������������������ 128
JSpinner ����������������������������������������������������������������������������������������������������������������������� 137
JScrollBar ��������������������������������������������������������������������������������������������������������������������� 139
JScrollPane ������������������������������������������������������������������������������������������������������������������ 140
JProgressBar ���������������������������������������������������������������������������������������������������������������� 142
JSlider �������������������������������������������������������������������������������������������������������������������������� 143
JSeparator �������������������������������������������������������������������������������������������������������������������� 145
Menus��������������������������������������������������������������������������������������������������������������������������� 145
JToolBar������������������������������������������������������������������������������������������������������������������������ 153
JToolBar Meets the Action Interface ����������������������������������������������������������������������������� 156
JTable ��������������������������������������������������������������������������������������������������������������������������� 157
www.allitebooks.com
剩余825页未读,继续阅读
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![epub](https://img-home.csdnimg.cn/images/20210720083646.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://profile-avatar.csdnimg.cn/6f796f81c14c4ae1a4232cbce2434aaa_kxg1005.jpg!1)
白鸽-小蛋
- 粉丝: 10
- 资源: 167
上传资源 快速赚钱
我的内容管理 收起
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助
![](https://csdnimg.cn/release/wenkucmsfe/public/img/voice.245cc511.png)
会员权益专享
最新资源
- 藏经阁-应用多活技术白皮书-40.pdf
- 藏经阁-阿里云计算巢加速器:让优秀的软件生于云、长于云-90.pdf
- 藏经阁-玩转AIGC与应用部署-92.pdf
- 藏经阁-程序员面试宝典-193.pdf
- 藏经阁-Hologres 一站式实时数仓客户案例集-223.pdf
- 藏经阁-一站式结构化数据存储Tablestore实战手册-206.pdf
- 藏经阁-阿里云产品九月刊-223.pdf
- 藏经阁-2023云原生实战案例集-179.pdf
- 藏经阁-Nacos架构&原理-326.pdf
- ZTE电联中频一张网配置指导书
- 企业级数据治理之数据安全追溯
- MISRA-C 2012-中文翻译版.pdf
- 藏经阁-《多媒体行业质量成本优化及容灾方案白皮书》-37.pdf
- 藏经阁-浅谈阿里云通用产品线Serverless的小小演化史-23.pdf
- 藏经阁-冬季实战营第一期:从零到一上手玩转云服务器-44.pdf
- 藏经阁-云上自动化运维宝典-248.pdf
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
![](https://img-home.csdnimg.cn/images/20220527035711.png)
![](https://img-home.csdnimg.cn/images/20220527035711.png)
![](https://img-home.csdnimg.cn/images/20220527035111.png)
安全验证
文档复制为VIP权益,开通VIP直接复制
![](https://csdnimg.cn/release/wenkucmsfe/public/img/green-success.6a4acb44.png)