Book description
Beginning Java 8 APIs, Extensions and Libraries completes the Apress learning Java journey and is a comprehensive approach to learning the Java programming language extensions and available APIs and libraries, including the new JavaFX APIs.
This book covers the key extensions of the Java programming language such as Swing, JavaFX, network programming, and JDBC. Each topic starts with a discussion of the topic's background. A step-by-step process, with small snippets of Java code, provides easy-to-follow instructions. At the end of a topic, a complete and ready-to-run Java program is provided. This book contains over 130 images and diagrams to help you visualize and better understand the topics. More than 130 complete programs allow you to practice and quickly learn the topics.
The Swing chapters discuss various aspects of working with a GUI, from the very basic concepts of developing a Swing application, to the most advanced topics, such as decorating a Swing component with a JLayer, drag-and-drop features, Synth Skinnable L&F, etc.
The chapter on network programming covers the basics of network technologies first, and then, the advanced topics of network programming, using a Java class library. It covers IPv4 and IPv6, addressing schemes, subnetting, supernetting, multicasting, TCP/IP sockets, UPD sockets, asynchronous socket I/O, etc.
The chapter on JDBC provides the details of connecting and working with databases such as Oracle, SQL Server, MySQL, DB2, Java DB (Apache Derby), Sybase, Adaptive Server Anywhere, etc. It contains a complete discussion on processing a ResultSet and a RowSet. It discusses how to use the RowSetFactory, to obtain a RowSet object of a specific type. Working with Large Objects (LOBs), such as Blob, Clob, and NClob, is covered in detail with Java code examples and database scripts.
Table of contents
- Cover
- Title
- Copyright
- Dedication
- Contents at a Glance
- Contents
- About the Author
- About the Technical Reviewer
- Acknowledgments
- Foreword
- Introduction
- Chapter 1: Introduction to Swing
-
Chapter 2: Swing Components
- What Is a Swing Component?
- JButton
- JPanel
- JLabel
- Text Components
- Validating Text Input
- Making Choices
- JSpinner
- JScrollBar
- JScrollPane
- JProgressBar
- JSlider
- JSeparator
- Menus
- JToolBar
- JToolBar Meets the Action Interface
- JTable
- JTree
- JTabbedPane and JSplitPane
- Custom Dialogs
- Standard Dialogs
- File and Color Choosers
- JWindow
- Working with Colors
- Working with Borders
- Working with Fonts
- Validating Components
- Painting Components and Drawing Shapes
- Immediate Painting
- Double Buffering
- JFrame Revisited
- Summary
- Chapter 3: Advanced Swing
-
Chapter 4: Applets
- What Is an Applet?
- Developing an Applet
- Writing an Applet
- Deploying an Applet
- Installing and Configuring Java Plug-in
- Viewing an Applet
- Using the appletviewer to Test Applets
- Using the codebase Attribute
- The Life Cycle of an Applet
- Passing Parameters to Applets
- Publishing the Applet’s Parameter Information
- Publishing the Applet’s Information
-
Other Attributes of the <applet> Tag
- Using Images in an Applet
- Playing Audio Clips in an Applet
- Interacting with the Applet’s Environment
- Communion of Applet, HTML, and JavaScript
- Packaging Applets in Archives
- The Event Dispatching Thread and Applets
- Painting in Applets
- Is the Java Code Trusted?
- Security Restrictions for Applets
- Signing Applets
- Summary
-
Chapter 5: Network Programming
- What Is Network Programming?
- Network Protocol Suite
- IP Addressing Scheme
- Special IP Addresses
- Port Numbers
- Socket API and Client-Server Paradigm
- Representing a Machine Address
- Representing a Socket Address
- Creating a TCP Server Socket
- Creating a TCP Client Socket
- Putting a TCP Server and Clients Together
- Working with UDP Sockets
- Creating a UDP Echo Server
- A Connected UDP Socket
- UDP Multicast Sockets
- URI, URL, and URN
- URI and URL as Java Objects
- Accessing the Contents of a URL
- Non-Blocking Socket Programming
- Socket Security Permissions
- Asynchronous Socket Channels
- Datagram-Oriented Socket Channels
- Multicasting Using Datagram Channels
- Further Reading
- Summary
-
Chapter 6: JDBC API
- What Is the JDBC API?
- System Requirements
- Types of JDBC Drivers
- A Brief Overview of Java DB
- Creating a Database Table
- Connecting to a Database
- Setting the Auto-Commit Mode
- Committing and Rolling Back Transactions
- Transaction Isolation Level
- JDBC-Types-to-Java-Types Mapping
- Knowing About the Database
- Executing SQL Statements
- Processing Result Sets
- Making Changes to a ResultSet
- Handling Multiple Results from a Statement
- Getting a ResultSet from a Stored Procedure
- ResultSetMetaData
- Using RowSets
- Working with a Large Object (LOB)
- Batch Updates
- Savepoints in a Transaction
- Using a DataSource
- Retrieving SQL Warnings
- Enabling JDBC Trace
- Summary
-
Chapter 7: Java Remote Method Invocation
- What Is Java Remote Method Invocation?
- The RMI Architecture
- Developing an RMI Application
- Separating the Server and Client Code
- Generating Stub and Skeleton
- Running the RMI Application
- Troubleshooting an RMI Application
- Debugging an RMI Application
- Dynamic Class Downloading
- Garbage Collection of Remote Objects
- Summary
-
Chapter 8: Java Native Interface
- What Is the Java Native Interface?
- System Requirements
- Getting Started with the JNI
- Native Function Naming Rules
- Data Type Mapping
- Using JNI Functions in C/C++
- Working with Strings
- Working with Arrays
- Accessing Java Objects in Native Code
- Exception Handling
- Creating an Instance of the JVM
- Synchronization in Native Code
- Summary
-
Chapter 9: Introduction to JavaFX
- What Is JavaFX?
- The History of JavaFX
- System Requirements
- The JavaFX Runtime Library
- JavaFX Source Code
- Your First JavaFX Application
- Improving the HelloFX Application
- The Life Cycle of a JavaFX Application
- Terminating a JavaFX Application
- What Are Properties and Bindings?
- Properties and Bindings in JavaFX
- Observable Collections
- Event Handling
- Layout Panes
- Controls
- Using 2D Shapes
- Drawing on a Canvas
- Applying Effects
- Applying Transformations
- Animation
- FXML
- Printing
- Summary
-
Chapter 10: Scripting in Java
- What Is Scripting in Java?
- Executing Your First Script
- Using Other Scripting Languages
-
Exploring the javax.script Package
- The ScriptEngine and ScriptEngineFactory Interfaces
- The AbstractScriptEngine Class
- The ScriptEngineManager Class
- The Compilable Interface and the CompiledScript Class
- The Invocable Interface
- The Bindings Interface and the SimpleBindings Class
- The ScriptContext Interface and the SimpleScriptContext Class
- The ScriptException Class
- Discovering and Instantiating ScriptEngines
- Executing Scripts
- Passing Parameters
- Advanced Parameter Passing Techniques
- Using a Custom ScriptContext
- Return Value of the eval() Method
- Reserved Keys for Engine Scope Bindings
- Changing the Default ScriptContext
- Sending Scripts Output to a File
- Invoking Procedures in Scripts
- Implementing Java Interfaces in Scripts
- Using Compiled Scripts
- Using Java in Scripting Languages
- Implementing a Script Engine
- The jrunscript Command-line Shell
- The jjs Command-Line Tool
- JavaFX in Nashorn
- Summary
- Index
Product information
- Title: Beginning Java 8 APIs, Extensions and Libraries Swing, JavaFX, JavaScript, JDBC and Network Programming APIs
- Author(s):
- Release date: September 2014
- Publisher(s): Apress
- ISBN: 9781430266624
You might also like
book
Java Coding Problems
Develop your coding skills by exploring Java concepts and techniques such as Strings, Objects and Types, …
book
The Complete Coding Interview Guide in Java
Explore a wide variety of popular interview questions and learn various techniques for breaking down tricky …
book
WebSphere MQ Primer: An Introduction to Messaging and WebSphere MQ
The power of IBM® WebSphere® MQ is its flexibility combined with reliability, scalability, and security. This …
book
Designing Data-Intensive Applications
Data is at the center of many challenges in system design today. Difficult issues need to …