Beginning Java 8 APIs, extensions and libraries : Swing, JavaFX, JavaScript, JDBC and network programming APIs /
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...
Clasificación: | Libro Electrónico |
---|---|
Autor principal: | |
Formato: | Electrónico eBook |
Idioma: | Inglés |
Publicado: |
[Berkeley, CA] :
Apress,
2014.
|
Colección: | Expert's voice in Java.
|
Temas: | |
Acceso en línea: | Texto completo (Requiere registro previo con correo institucional) |
Tabla de Contenidos:
- Machine generated contents note: What Is Swing?
- Simplest Swing Program
- Components of a JFrame
- Adding Components to a JFrame
- Some Utility Classes
- Point Class
- Dimension Class
- Insets Class
- Rectangle Class
- Layout Managers
- FlowLayout
- BorderLayout
- CardLayout
- BoxLayout
- GridLayout
- GridBagLayout
- SpringLayout
- GroupLayout
- null Layout Manager
- Creating a Reusable JFrame
- Event Handling
- Handling Mouse Events
- Summary
- What Is a Swing Component?
- JButton
- JPanel
- JLabel
- Text Components
- JTextComponent
- JTextField
- JPasswordField
- JFormattedTextField
- JTextArea
- JEditorPane
- JTextPane
- 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
- JFileChooser
- JColorChooser
- JWindow
- Working with Colors
- Working with Borders
- Working with Fonts
- Validating Components
- Painting Components and Drawing Shapes
- Immediate Painting
- Double Buffering
- JFrame Revisited
- Summary
- Using HTML in Swing Components
- Threading Model in Swing
- Pluggable Look and Feel
- Skinnable Look-and-Feel
- Drag and Drop
- Multiple Document Interface Application
- Toolkit Class
- Decorating Components Using JLayer
- Translucent Windows
- Shaped Window
- Summary
- What Is an Applet?
- Developing an Applet
- Writing an Applet
- Deploying an Applet
- Creating the HTML Document
- Deploying Applets in Production
- Deploying Applets for Testing
- Installing and Configuring Java Plug-in
- Installing the Java Plug-in
- Opening the Java Control Panel
- Configuring Java Plug-in
- Viewing an Applet
- Using the appletviewer to Test Applets
- Using the codebase Attribute
- Example 1
- Example 2
- Example 3
- Life Cycle of an Applet
- init() Method
- start() Method
- stop() Method
- destroy() Method
- 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
- Event Dispatching Thread and Applets
- Painting in Applets
- Is the Java Code Trusted?
- Security Restrictions for Applets
- Signing Applets
- Step 1: Developing an Applet
- Step 2: Packaging Class Files into a JAR File
- Step 3: Generating Private/Public Key Pair
- Step 4: Signing the JAR File
- Step 5: Creating the HTML File
- Step 6: Viewing the Signed Applet
- Summary
- What Is Network Programming?
- Network Protocol Suite
- IP Addressing Scheme
- IPv4 Addressing Scheme
- IPv6 Addressing Scheme
- Special IP Addresses
- Loopback IP Address
- Unicast IP Address
- Multicast IP Address
- Anycast IP Address
- Broadcast IP Address
- Unspecified IP Address
- Port Numbers
- Socket API and Client-Server Paradigm
- Socket Primitive
- Bind Primitive
- Listen Primitive
- Accept Primitive
- Connect Primitive
- Send/Sendto Primitive
- Receive/ReceiveFrom Primitive
- Close Primitive
- 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
- 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
- Setting Up an Asynchronous Server Socket Channel
- Setting up an Asynchronous Client Socket Channel
- Putting the Server and the Client Together
- Datagram-Oriented Socket Channels
- Creating the Datagram Channel
- Setting the Channel Options
- Sending Datagrams
- Multicasting Using Datagram Channels
- Creating the Datagram Channel
- Setting the Channel Options
- Binding the Channel
- Setting the Multicast Network Interface
- Joining the Multicast Group
- Receiving a Message
- Closing the Channel
- Further Reading
- Summary
- What Is the JDBC API?
- System Requirements
- Types of JDBC Drivers
- JDBC Native API Driver
- JDBC-Net Driver
- JDBC Driver
- Brief Overview of Java DB
- Java DB Installation Files
- Configuring Java DB
- Running the Java DB Server
- Creating a Database Table
- Oracle Database
- Adaptive Server Anywhere Database
- SQL Server Database
- DB2 Database
- MySQL Database
- Java DB Database
- Connecting to a Database
- Obtaining the JDBC Driver
- Setting up the CLASSPATH
- Registering a JDBC Driver
- Setting the jdbc.drivers System Property
- Loading the Driver Class
- Using the registerDriver() Method
- Constructing a Connection URL
- Establishing the Database Connection
- Setting the Auto-Commit Mode
- Committing and Rolling Back Transactions
- Transaction Isolation Level
- Dirty Read
- Non-Repeatable Read
- Phantom Read
- JDBC-Types-to-Java-Types Mapping
- Knowing About the Database
- Executing SQL Statements
- Results of Executing a SQL Statement
- Using the Statement Interface
- Using the PreparedStatement Interface
- CallableStatement Interface
- Processing Result Sets
- What Is a ResultSet?
- Getting a ResultSet
- Getting the Number of Rows in a ResultSet
- Bidirectional Scrollable ResultSets
- Scrolling Through Rows of a ResultSet
- Knowing the Cursor Position in a ResultSet
- Closing a ResultSet
- Making Changes to a ResultSet
- Inserting a Row Using a ResultSet
- Updating a Row Using a ResultSet
- Deleting a Row Using a ResultSet
- Handling Multiple Results from a Statement
- Getting a ResultSet from a Stored Procedure
- MySQL Database
- Adaptive Server Anywhere Database
- Oracle Database
- SQL Server Database
- DB2 Database
- Java DB Database
- ResultSetMetaData
- Using RowSets
- Working with a Large Object (LOB)
- Retrieving LOB Data
- Creating a LOB Data
- Batch Updates
- Savepoints in a Transaction
- Using a DataSource
- Retrieving SQL Warnings
- Enabling JDBC Trace
- Summary
- What Is Java Remote Method Invocation?
- RMI Architecture
- Developing an RMI Application
- Writing the Remote Interface
- Implementing the Remote Interface
- Writing the RMI Server Program
- Writing the RMI Client Program
- Separating the Server and Client Code
- Generating Stub and Skeleton
- Running the RMI Application
- Running the RMI Registry
- Running the RMI Server
- Running an RMI Client Program
- Troubleshooting an RMI Application
- java.rmi. StubNotFoundException
- java.rmi.server. ExportException
- java.security. AccessControlException
- java.lang. ClassNotFoundException
- Debugging an RMI Application
- Dynamic Class Downloading
- Garbage Collection of Remote Objects
- Summary
- What Is the Java Native Interface?
- System Requirements
- Getting Started with the JNI
- Writing the Java Program
- Compiling the Java Program
- Creating the C/C++ Header File
- Writing the C/C++ Program
- Creating a Shared Library
- Running the Java Program
- 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
- Getting a Class Reference
- Accessing Fields and Methods of a Java Object/Class
- Creating Java Objects
- Exception Handling
- Handle the Exception in Native Code
- Handling the Exception in Java Code.
- Throwing a New Exception from Native Code
- Creating an Instance of the JVM
- Synchronization in Native Code
- Summary
- What Is JavaFX?
- History of JavaFX
- System Requirements
- JavaFX Runtime Library
- JavaFX Source Code
- Your First JavaFX Application
- Creating the HelloJavaFX Class
- Overriding the start() Method
- Showing the Stage
- Launching the Application
- Adding the main() Method
- Adding a Scene to the Stage
- Improving the HelloFX Application
- Life Cycle of a JavaFX Application
- Terminating a JavaFX Application
- What Are Properties and Bindings?
- Properties and Bindings in JavaFX
- Using Properties in JavaFX Beans
- Handling Property Invalidation Events
- Handling Property Change Events
- Property Bindings in JavaFX
- Observable Collections
- Event Handling
- Event Processing Mechanism
- Creating Event Filters and Handlers
- Registering Event Filters and Handlers
- Layout Panes
- Controls
- Using 2D Shapes
- Drawing on a Canvas
- Applying Effects
- Applying Transformations
- Animation
- Using the Timeline Animation
- FXML
- Printing
- Summary
- What Is Scripting in Java?
- Executing Your First Script
- Using Other Scripting Languages
- Exploring the javax.script Package
- ScriptEngine and ScriptEngineFactory Interfaces
- AbstractScriptEngine Class
- ScriptEngineManager Class
- Compilable Interface and the CompiledScript Class
- Invocable Interface
- Bindings Interface and the SimpleBindings Class
- ScriptContext Interface and the SimpleScriptContext Class
- ScriptException Class.
- Note continued: Discovering and Instantiating ScriptEngines
- Executing Scripts
- Passing Parameters
- Passing Parameters from Java Code to Scripts
- Passing Parameters from Scripts to Java Code
- Advanced Parameter Passing Techniques
- Bindings
- Scope
- Defining the Script Context
- Putting Them Together
- 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
- Declaring Variables
- Importing Java Classes
- Creating and Using Java Objects
- Using Overloaded Java Methods
- Using Java Arrays
- Extending Java Classes Implementing Interfaces
- Using Lambda Expressions
- Implementing a Script Engine
- Expression Class
- JKScriptEngine Class
- JKScriptEngineFactory Class
- Preparing for Deployment
- Packaging the JKScript Files
- Using the JKScript Script Engine
- jrunscript Command-line Shell
- Syntax
- Execution Modes of the Shell
- Listing Available Script Engines
- Adding a Script Engine to the Shell
- Using Other Script Engines
- Passing Arguments to Scripts
- jjs Command-Line Tool
- JavaFX in Nashorn
- Summary.