Superclasses of Swing’s Lightweight GUI Components
The UML class diagram of Fig. 12.5 shows an inheritance hierarchy of classes from which lightweight Swing components inherit their common attributes and behaviors.
Class Component (package java.awt
) is a superclass that declares the common features of GUI components in packages java.awt
and javax.swing
. Any object that is a Container (package java.awt
) can be used to organize Component
s by attaching the Component
s to the Container
. Container
s can be placed in other Container
s to organize a GUI.
Class JComponent (package javax.swing ...
Get Java™ How To Program (Early Objects), Tenth Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.