Creating User Interfaces using Swing

This course shows how to create contemporary user interfaces in Java using Swing. Swing provides a rich set of components for building desktop GUI applications, including table controls, tree controls, list controls, and so on. Swing also provides APIs for drag-and-drop, accessing the Desktop and the System Tray, and performing copy-and-paste operations with the Clipboard. This course covers all of these features, and also addresses advanced issues such as defining custom models, renderers, and editors.


2 days



  • At least 6 months Java programming experience

What you'll learn

  • Using Swing UI controls
  • Laying out the user interface
  • Using data-driven controls
  • Defining custom models
  • Customizing renderers and editors
  • Implementing internationalization and accessibility

Course details

Getting Started with Swing

  • Introduction to Swing
  • Swing example application

Containers and Components

  • Overview of panes and components
  • Using panes in a UI
  • Adding components to panes

Layouts and Dialogs

  • Overview of layout managers
  • Using layout managers effectively
  • Displaying dialog boxes

Tables and Trees

  • Overview of JTable
  • Configuring and using JTable
  • Overview of JTree
  • Populating a JTree
  • Handling events and inserting/removing nodes

Defining Custom Models

  • Recap MVC concepts
  • Defining a custom table model
  • Defining a custom tree model

Defining Custom Renderers and Editors

  • Overview of renderers and editors
  • Defining a custom cell renderer
  • Defining a custom cell editor

Globalization and Localization

  • Internationalization fundamentals
  • List resource bundles
  • Component orientation


  • Overview of accessibility
  • Accessibility guidelines
  • Defining actions and key bindings

Drag and Drop and Data Transfer

  • Overview of data transfer
  • Adding data transfer support to components
  • Extending Dnd support
  • Additional techniques

Integrating with the Desktop and the System Tray

  • Integrating with the desktop
  • Accessing the system tray