Chapter 21. JFC and the Swing Package

JFC and the Swing Package

In Chapter 19, we saw that the basic idea behind Java GUI programs is that you:

  • Declare controls. You can subclass them to add to the behavior, but this is often unnecessary.

  • Implement an interface to get the event-handler that responds to control activity.

  • Add the controls to a container. Again, subclassing is possible but frequently unnecessary.

That chapter explained how to handle the events that controls generate. This chapter dives ...

Get Just Java™ 2, Fifth Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.