DOC

Java Advanced Programming Contents

By Stacy Evans,2014-04-24 12:57
16 views 0
Java Advanced Programming Contents

Java (v1.2): Advanced Programming

Five-day Course

     ? The Courseware Shop 1999-2008

    Contents

    1. Sound In Java Page

    Overview of Sound in Java .................................................................. 2

    Playing Sounds .................................................................................... 3

    Example .............................................................................................. 4

    Playing Sounds from an Application.................................................... 8

2. Networking in Java - Part I Page

    Loading applets from a network .......................................................... 2

    Loading images from URL .................................................................. 2

    Networking Basics .............................................................................. 2

    TCP ..................................................................................................... 3

    UDP .................................................................................................... 3

    Networking classes in JDK .................................................................. 5

    Working with URLs ............................................................................ 5

    What is a URL? ................................................................................... 5

    Creating a URL ................................................................................... 6

    Parsing a URL ..................................................................................... 9

    Reading directly from a URL ............................................................ 10

    Connecting to a URL ......................................................................... 11

    Reading from and writing to a URL connection ................................. 12

    Example ............................................................................................ 13 3. Networking in Java - Part II Page

    Sockets ................................................................................................ 2

    What is a Socket .................................................................................. 2

    Reading from and writing to a Socket .................................................. 3

    Writing the Server side of a socket ...................................................... 6

    4. Networking in Java - Part III Page

    Datagrams ........................................................................................... 2

    What is a Datagram ............................................................................. 2

    Writing a Datagram Client and Server ................................................. 3

    Broadcasting to Multiple Recepient ..................................................... 8

24/04/10 Java Advanced Programming Contents Contents

     ? The Courseware Shop 1999-2008

    5. Internationalization Page

    Introduction ......................................................................................... 2 An Example ........................................................................................ 2 Before Internationalization .................................................................. 3 After Internationalization .................................................................... 3 Running the sample program ............................................................... 4 Internationalizing the program ............................................................. 4 Creating the Properties File ................................................................. 5 Defining the Locale ............................................................................. 5 Creating a ResourceBundle ................................................................. 6 Fetching the text from the ResourceBundle ......................................... 7

    6. The Reflection API Page

    Introduction to Reflection API ............................................................. 2 Examining Classes .............................................................................. 3 Retrieving Class Objects ..................................................................... 3 Getting the Class name ........................................................................ 4 Discovering Class Modifiers ............................................................... 4 Finding SuperClasses .......................................................................... 5 Identifying the interfaces implemented by a class ................................ 6 Examining Interfaces ........................................................................... 7 Identifying Class Fields ....................................................................... 8 Discovering Class Constructors ........................................................... 9 Obtaining Method Information .......................................................... 11 Manipulating Objects ........................................................................ 13 Creating Objects ................................................................................ 13 Using No-Argument Constructors ..................................................... 13 Using Constructors that have arguments ............................................ 14 Getting Field Values .......................................................................... 16 Setting Field Values .......................................................................... 17 Invoking Methods ............................................................................. 18

    7. Java Beans Page

    JavaBeans ........................................................................................... 2 JavaBeans Concepts ........................................................................... 2 BDK Contents .................................................................................... 3 Using the BeanBox ............................................................................. 5 Adding a Bean to the Toolbox ............................................................ 6 Dropping a Bean on the Beanbox ....................................................... 6 Editing Bean Properties ...................................................................... 7

    24/04/10 Java Advanced Programming Contents Contents

     ? The Courseware Shop 1999-2008

    Saving and Restoring Beans ............................................................... 7 The BeanBox Menus .......................................................................... 8 Using the BeanBox to generate Applets .............................................. 9 Writing a Simple Bean ..................................................................... 10 Properties ......................................................................................... 13 Adding a Color Property ................................................................... 13 Bound Properties .............................................................................. 16 Implementing bound property support within a bean ........................ 16

    Implementing bound property listeners ............................................. 17 Bound Properties in the BeanBox ..................................................... 18 Constrained Properties ...................................................................... 20 Implementing constrained property support within a bean ................ 20

    Implementing constrained property listeners ..................................... 22 Constrained Properties in the BeanBox ............................................. 22 Indexed Properties ............................................................................ 24 Indexed Property Editors ................................................................... 25 Manipulating Events in the BeanBox ................................................. 27 Using BeanInfo to define events a bean fires ..................................... 28 The BeanInfo Interface ...................................................................... 31 Bean Customization .......................................................................... 35 Bean Persistence................................................................................ 38

    8. JAR Files in Java Page

    Introduction ......................................................................................... 2 Using JAR files ................................................................................... 2 Creating a JAR file .............................................................................. 3 Viewing the Contents of a JAR file ..................................................... 4 Extracting the Contents of a JAR file ................................................... 5 Modifying a Manifest file .................................................................... 5 Updating a JAR file ............................................................................. 8 Running JAR-packaged software ......................................................... 9 Understanding the Manifest ............................................................... 10

    9. RMI - Remote Method Invocation Page

    Overview of RMI applications ............................................................. 2 Writing a RMI Server .......................................................................... 6 Implementing a Remote Interface ........................................................ 8 Creating a client program .................................................................. 14 Compiling the example programs ...................................................... 19 Running the example programs ......................................................... 23

    24/04/10 Java Advanced Programming Contents Contents

     ? The Courseware Shop 1999-2008

    10. Servlet Page

    Architecture of Servlet Package ........................................................... 2

    A Simple Servlet ................................................................................. 4

    Interacting with Clients ....................................................................... 5

    Requests and Responses ...................................................................... 5

    Handling Get and Post Requests .......................................................... 6

    Threading Issues.................................................................................. 9

    Life Cycle of a Servlet ....................................................................... 10

    Initializing a Servlet .......................................................................... 10

    Destroying a Servlet .......................................................................... 11

    Handling Service threads at Servlet termination................................. 12

    Providing a clean shutdown ............................................................... 14

    Creating polite long-running methods ................................................ 14

    Saving Client State ............................................................................ 15

    Session tracking ................................................................................ 16

    Using cookies .................................................................................... 17

    11. JAVA - IDL Page

    What is Java IDL ................................................................................. 2

    The Corba Architecture ....................................................................... 2

    The Java IDL Development Process .................................................... 3

    The Hello Client Server Example ........................................................ 4

    Developing a Client application ........................................................... 7

    Developing the Hello World Server ................................................... 12

    Using Stringified Object References .................................................. 16

    12. JFC and Swing - Part I Page

    JFC and Swing ................................................................................... 2

    Difference between Swing and AWT Components ............................. 3

    Compiling and running Swing programs ............................................. 4

    A Quick Tour of Swing Application's Code ........................................ 6

    13. Swing - Part II - Swing Features and Concepts Page

    Swing Components and Containment Hierarchy .................................. 2

    Layout Management ........................................................................... 3

    Setting the Layout Manager ................................................................ 3

    Providing hints about a component ..................................................... 4

    Putting space between components ..................................................... 4

    24/04/10 Java Advanced Programming Contents Contents

     ? The Courseware Shop 1999-2008

    How Layout Management Occurs ....................................................... 5 Event Handling .................................................................................. 6 How to implement an Event Handler .................................................. 6 Threads and Event Handling ............................................................... 7 Painting .............................................................................................. 7 Threads and Swing ............................................................................. 9 More Swing Features and Concepts .................................................. 10

    14. Swing - Part III - Using Swing Components Page

    The Jcomponent Class ......................................................................... 2 Jcomponent Features ........................................................................... 2 The Jcomponent API ........................................................................... 4 Using Top Level Containers .............................................................. 11 Top Level Containers and Containment Hierarchies .......................... 12

    The Frame API .................................................................................. 15 An overview of Dialogs ..................................................................... 17 How to make Applets ........................................................................ 22 How to use Panels ............................................................................. 24 How to use Scroll Panes .................................................................... 26 How to use Split Panes ...................................................................... 29 How to use Tabbed Panes .................................................................. 31 How to use Tool Bars ........................................................................ 33 How to use Internal Frames .............................................................. 34 How to use Layered Panes ................................................................ 37 How to use Root Panes ..................................................................... 39

    15. Swing- Part IV - Using Atomic Components Page

    Using Atomic Components .................................................................. 2 Buttons, Check Boxes and Radio Buttons ............................................ 2 Color Choosers .................................................................................... 6 Combo Boxes ...................................................................................... 8 File Choosers .................................................................................... 10 Labels ............................................................................................... 12 Lists .................................................................................................. 14 Menus ............................................................................................... 16 How to monitor progress ................................................................... 19 Sliders ............................................................................................... 22 Tables ............................................................................................... 24 Using Swing's Text Components ....................................................... 27

    24/04/10 Java Advanced Programming Contents Contents

     ? The Courseware Shop 1999-2008

    Tool Tips ........................................................................................... 28

    16. Swing - Part V - Examples Page

    Example 1: Using Buttons ................................................................... 2 Example 2: Using Check Boxes........................................................... 4 Example 3: Using Color Choosers ....................................................... 7 Example 4: Using Combo Boxes ......................................................... 9 Example 5: Using Dialogs ................................................................. 11 Example 6: Using Trees .................................................................... 21 Example 7: Using File Choosers ........................................................ 23 Example 8: How to make Frames ...................................................... 25 Example 9: How to use Root Panes ................................................... 26 Example 10: How to use Labels ........................................................ 31 Example 11: How to use Layered Panes ............................................ 33 Example 12: How to use Lists ........................................................... 36 Example 13: How to use Menus ........................................................ 39 Example 14: How to Monitor Progress .............................................. 42 Example 15: How to use Radio Buttons ............................................. 44 Example 16: How to use Scroll Panes ................................................ 47 Example 17: How to use Sliders ........................................................ 49 Example 18: How to use Split Panes.................................................. 52

    24/04/10 Java Advanced Programming Contents Contents

Report this document

For any questions or suggestions please email
cust-service@docsford.com