Courses
Java
Home
Corporate
Consulting
Contact Us
Courses
Jobs
Custom Topics

Customize this course,
choose your topics

Building Your Course
Custom Order Page
Building Guidelines

Selectable Topics
Advanced Applets
Advanced AWT
Collections
CORBA
Custom Components
Drag'n Drop
Enterprise JavaBeans
Event Delegation
GridbagLayout
InfoBus
Inner Classes
Internationalization
Java 2 Overview
JavaBeans
JFC Overview
JSP (Java Server Pages)
JSP Tag Libraries (taglib)
JDBC
JNI
RMI
Security
Serialization
Servlets
Struts
Swing
WebServices Overview
XML

Swing Introduction

The "Swing Set" is a group of related packages (the javax.swing package, and all its sub-packages) that contain new GUI components that are alternates to the original AWT components. Using the new swing classes, one can develop GUIs that are far more sophisticated than what can be created with the AWT.

The Swing components use the Model-View Controller design pattern in such a way that it is possible to switch the look and feel at runtime (between Windows, Motif, Macintosh, and Java aka. "Metal").

Swing is written in pure Java. Swing components do not use a native peer, like the AWT components. As a result, swing does not suffer from:

  • syncrhronization bugs that occurred between components and their native peers
  • platform-specific bugs
  • lack of support for designing custom components that adapt to local look and feel
Swing is not limited to the "lowest common denominator" that AWT components were limited to. You'll be impressed when you see what can be done with swing.

We'll begin by looking at new layout managers, and JComponent. We'll add a component to a content pane. Next we'll look at borders, and discuss tool tips, swing buttons, button groups, and icons. Then we'll examine sliders, progress bars, trees, tables, tabbed panes, and tool bars. We'll also discuss menus, swing windows (JFrame, JDialog, and JApplet). We'll examine a pre-jfc Applet (that uses AWT) and examine how to migrate it to use Swing.

Objectives

  • Understand the basics of Swing
  • Know how to use the pluggable look and feel
  • Use the following swing components:
    • JComponent
      • borders
      • tool tips
    • swing buttons
      • button groups
    • icons
    • sliders
    • progress bars
    • trees
    • tables
    • tabbed panes
    • tool bars
    • menus
    • swing windows (JFrame, JDialog, and JApplet)

Specifications

  • Duration (total): 2 hours - 2.5 hours
  • Duration of Exercises: 1 hour
  • Duration of Lecture: 1.5 hours

Pre-requisites

Material covered in this section requires attendees to know the following:

  • Basic Java knowledge including exception handling, threads, applets, full use of all the language constructs, and familiarity with the core Java 1.1 APIs.
  • Those without these pre-requisites should consider one of our Ultimate Java Programming Workshops.

A table of contents of this module is available upon request.

Return to the Custom Order Page.

Copyright ©2007 by Petronio Technology Group, Inc. All rights reserved. Petronio, "Targeted Technology Training", "T3" and "Turning new technologies into your competitive advantage" are trademarks of Petronio Technology Group. All other trademarks are the properties of their respective companies.