develop applications with Java Swing

Swing is the replacement for AWT. It is a very clean design, based on well known design patterns, such as Observer. At root it is a set of components. We focus on showing you the underlying mechanisms — this deeper insight makes it far simpler to work with the whole collection of Swing components.

Duration: 2 days

objectives

  • learn the fundamental mechanics of Swing components
  • practice working with the essential elements such as layout, widgets, and events
  • understand the patterns that Swing is based on
  • review the more complex aspects of designing a user interface, e.g. optimization with threads, and meta-programming
  • try out some of the harder Swing components, such as JTree

target audience

The course is suitable for Java developers.

prerequisites

Ideally this training should be preceded by the course: design and develop applications with Java.

Basic layout

  • using JFrame and widgets
  • JComponent
  • layouts
  • JApplet

Simple user input

  • button handling
  • menu handling
  • actions
  • mouse handling and popup menus

Swing widgets

  • widgets with simple state
  • radio buttons and check boxes
  • widgets with complex models
  • JList
  • JTable
  • decorator patterns to filter tables
  • JTree

More graphics

  • GridBag layout
  • dialogs and JOptionPane
  • mnemonics and accelerators
  • focus
  • tooltips

Event handling in Swing

  • event-handling basics
  • Java event listeners
  • listeners supported by Swing components
  • common events
  • listener API
  • event-handling for each Swing component

Threads in Swing

  • Java threads and the differences in Swing
  • thread theory: philosophers at lunch
  • Runnable interface and the Thread class
  • critical sections, locks, synchronization
  • GUI optimization
  • review of time-consuming tasks
  • optimize event-dispatching
  • repeat operations
  • waiting for messages

Patterns in Swing

  • MVC(Model View Controller)
  • Observer (Publish/Subscribe)
  • Interface Decoupling

Meta-programming

A review of dynamic programming with Swing components.

Please note, when taught at your site, this course is customizable. Modules can be adapted, removed, added from other courses, or even created.

timetable

Day 1

  • Basic layout
  • Simple user input
  • Swing widgets
  • More graphics

Day 2

  • Event handling in Swing
  • Threads in Swing
  • Patterns in Swing
  • Meta-programming

course instructor

The course is extremely practical, developed and taught by consultants with at least ten years' experience in software design.

print     printer-friendly version