Building a GUI: Events and Listeners

   

Now that you've learned how to establish a Swing GUI's look, it's time to consider its feel by using events and listeners.

Caution

Don't confuse this use of the phrase "look and feel" with the term PLAF. From a GUI building perspective, "look and feel" refers to the GUI design process.


You've already seen examples of Swing's events and listeners. If you recall, the ColorChooserDemo source code (in Listing 16.3), demonstrated change events and a change listener to respond to selections from a color chart.

Getting to know Swing's events and listeners involves studying the javax.swing.event package. You will also want to carefully review the SDK documentation, to learn what events are fired by each component. If you need additional examples, check out Sun's Java Tutorial at http://java.sun.com/docs/books/tutorial/.

   


Special Edition Using Java 2 Standard Edition
Special Edition Using Java 2, Standard Edition (Special Edition Using...)
ISBN: 0789724685
EAN: 2147483647
Year: 1999
Pages: 353

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