Introduction to the Swing Set

  • Swing is a subset of the Java Foundation Classes (JFC)
  • The name "Swing" is not an acronym
  • An effort to incorporate many of the features in Netscape's IFC as well as some aspects of IBM stuff
  • First released in March of 1998 with nearly 250 classes and 80 interfaces
  • Swing is not a replacement for the AWT.
    - Needed to support truly architecture independant interfaces
    - Contains more powerful components
  • Why bother?
    - Increased acceptance (many more supported architectures)
    - AWT based on architecture-specific widgits.

Swing Features

  • Pluggable Look and Feel
    • LnFs are increasingly important
    • Similar look of underlying environment
    • LnFs for UNIX, Windows, Apple. (Default is called Metal)
    • LnFs can be changed at run-time
  • Lightweight Components
    • Lightweight - components which are not dependant on native source to render
    • Heavyweights are unweildy because:
      - Equivalent components may act differently on different platforms
      - LnF is tied to the host environment
  • Many new Components
    • Tables
    • Trees
    • Sliders
    • Progress Bars
    • Internal Frames
    • Text Components (Very nice)
  • Tool tips
  • Support for undo/redo
  • Support for Multiple Document Interfaces (MDI) with InternalFrames

The MVC Architecture >>