Java Foundation Classes and Containers Flashcards
JFC
Java Foundation Classes
Group of features to develop GUIs and adding graphics functionality and interactivity
3 top-level container classes in swing API
JFrame
JDialog
JApplet
Containment Hierarchy
Tree of components that has a top-level container as its root
Needed to display UI during runtim
UI Components Containment Limits
Can only be contained once
Contained twice –> Goes with last container
Content Pane
Contains visible components in that top-level container’s UI
Standalone application with swing-based UI
At least one containment hierarchy with a JFrame as its root
Application has one main window and two dialogs
JFrame (1) as its root
JDialog (2) as it root
Swing-based applet
At least one containment hierarchy, exactly one of which is rooted by a JApplet object
Applet that brings up a dialog
JApplet (1) as its root
JDialog (1) as its root