CS3340:  Intro OOP and Design

Swing

  • package = javax.swing.*
  • JComponent parent (compared to Component)
  • J* = name of many classes in this package, e.g. JApplet, Jbutton, JFrame, etc.

WHY????

  • extends java.awt --

    AWT relies on natve peers.....looks different on each O.S.

    AWT's widgets do not have full functionality that reflecting todays possibilities

  • supports pluggable look and feel for component
    • allows you to create you own look and feel that is different than the O.S specific look you get with awt.
  • supports "tooltip" = like rollover message
  • supports authoscrolling, etc.
  • not all browsers have this package as a default....may have to download.


history about

 

Examples

JCheckboxMenuItem

JColorChooser

ImageIcon

JMenuBar

JTabbedPane

JTable

 

 

 

© Lynne Grewe