FileDocCategorySizeDatePackage
HBox.javaAPI DocExample687Thu Oct 24 20:14:24 BST 2002None

HBox

public class HBox extends JFrame

Fields Summary
Constructors Summary
public HBox()

    super("Horizontal Box Test Frame");
    setSize(200, 100);
    Panel box = new Panel();

    // Use BoxLayout.Y_AXIS below if you want a vertical box
    box.setLayout(new BoxLayout(box, BoxLayout.X_AXIS)); 
    setContentPane(box);
    for (int i = 0; i < 3; i++) {
      Button b = new Button("B" + i);
      box.add(b);
    }
    setDefaultCloseOperation(EXIT_ON_CLOSE);
    setVisible(true);
  
Methods Summary
public static voidmain(java.lang.String[] args)

    HBox bt = new HBox();