31. JTable and JTree

 
[Page 912 ( continued )]

Chapter Summary

  • JavaBeans is a software component architecture that extends the power of the Java language for building reusable software components . JavaBeans properties describe the state of the bean. Naturally, data fields are used to store properties. However, a bean property is not necessarily a data field.

  • A source component must have the appropriate registration and deregistration methods for adding and removing listeners. Events can be unicasted (only one listener object is notified of the event) or multicasted (each object in a list of listeners is notified of the event).

  • An event object is created using an event class, such as ActionEvent , MouseEvent , and ItemEvent . All event classes extend java.util.EventObject . Every event class is associated with an event listener interface that defines one or more methods referred to as handlers . An event listener interface is a subinterface of java.util.EventListener . Since an event class and its listener interface are coexistent, they are often referred to as an event set or event pair .

 


Introduction to Java Programming-Comprehensive Version
Introduction to Java Programming-Comprehensive Version (6th Edition)
ISBN: B000ONFLUM
EAN: N/A
Year: 2004
Pages: 503

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