Package ucb.gui2
package ucb.gui2
Provides the classes needed to implement a simple graphical user
interface, containing buttons, a menu bar, simple canvases
allowing arbitrary graphics and responding to the mouse or
keyboard, and modal dialogs and messages.
The class TopLevel provides top-level displayable
windows. Typically, you will extend this class and use its
constructor for your extension to set up menus, buttons, etc., and
to arrange the necessary callbacks that happen when these items
are clicked. Your main program creates a new instance of the
extended class, and uses its display method to make it appear.
The class TopLevel extends JFrame, serving as a top-level application
frame to contain various JComponents, plus menus. The class Pad is
such a JComponent, by default a blank area the is sensitive to
mouse and keyboard actions. Typically, you will extend Pad to
provide whatever functionality you want.
The class LayoutSpec encapsulates information needed to place
items into a TopLevel. You provide either a LayoutSpec or a set of
arguments for its constructor whenever you add something to the TopLevel.
-
ClassDescriptionA LayoutSpec specifies how an item is to be laid out in a TopLevel or other graphical container (here, we'll refer to such things collectively as containers).A Pad is a blank slate that may be inserted into a TopLevel.A top-level window with optional menu bar.