Class gjt.Box
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class gjt.Box

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Panel
                           |
                           +----gjt.Box

public class Box
extends Panel
A Panel containing a single component; an etched rectangle is drawn around the component, and a Label is centered at the top of the rectangle. Of course, the single component may be a container, and therefore a Box may surround many components.

Both the Component around which the box is drawn, and the String drawn at the top of the box are specified at construction time.

Etching of the box is controlled by etchedIn() and etchedOut(). Default etching is etched in.

Note: AWT 1.0.2 contains a bug which causes the Label.CENTER argument of the Label created for the title to be ignored, under Win95. Therefore, under Win95, the title will be off-center.

See Also:
EtchedRectangle, BoxTest

Constructor Index

 o Box(Component, Label)
 o Box(Component, String)

Method Index

 o etchedIn()
 o etchedOut()
 o paint(Graphics)
 o paramString()
 o reshape(int, int, int, int)
 o resize(int, int)

Constructors

 o Box
  public Box(Component surrounded,
             String title)
 o Box
  public Box(Component surrounded,
             Label label)

Methods

 o etchedIn
  public void etchedIn()
 o etchedOut
  public void etchedOut()
 o paint
  public void paint(Graphics g)
Overrides:
paint in class Component
 o resize
  public void resize(int w,
                     int h)
Overrides:
resize in class Component
 o reshape
  public void reshape(int x,
                      int y,
                      int w,
                      int h)
Overrides:
reshape in class Component
 o paramString
  protected String paramString()
Overrides:
paramString in class Container

All Packages  Class Hierarchy  This Package  Previous  Next  Index