Chapter 25. CREATING GUIS WITH SWING

     

DO OR DIE:

  • Shake it.

  • Please, don't break it.


Let GUI = Graphical User Interface;

Let Swing = JavaProgrammingLanguage.getProgrammingElement(GUI);

Swing.listImportantElements() {

//returns: TopLevelContainer (Frame)

//Intermediate Container (ContentPanel)

//LayoutManager(s)

//Atomic Elements (Components)

Frame.getDefinition() Main window that holds every other component of a Swing application. The frame, which is created as an object of type JFrame, contains controls for iconifying (minimizing) and maximizing the frame, and a little X for closing it.

Frame.getNote() Note that the JFrame is not the only kind of top-level container for Swing apps. JDialog is too, and so is JApplet (which is discussed in its own topic on Applets).

graphics/fridge_icon.jpg

FRIDGE

The back of this book, Chapter 35, features a "Toolkit," which is a load of applications that are pretty good quality that feature popular kinds of functionality, such as displaying scrollable areas, transforming XML and displaying it in a user interface, and connecting to a socket at the click of a menu button. Making GUIs with Java using AWT and Swing is a gigantic, really gigantic topic. The books that cover Swing alone are around 1,400 pages long. This topic tries to show you around the landscape a little, and then points you to the other places in the book where you can see this stuff implemented live. There is simply not room to go into Swing in depth here. But as we look at the landscape, you can get a feel for how things work, and it should be enough to get you started.




Java Garage
Java Garage
ISBN: 0321246233
EAN: 2147483647
Year: 2006
Pages: 228
Authors: Eben Hewitt

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net