FileDocCategorySizeDatePackage
HBoxWithStrut.javaAPI DocExample832Mon Nov 09 12:45:48 GMT 1998None

HBoxWithStrut

public class HBoxWithStrut extends JFrame

Fields Summary
Constructors Summary
public HBoxWithStrut()

    super("Box & Strut Frame");
    setSize(350, 80);
    Box box = Box.createHorizontalBox();
    setContentPane(box);
    for (int i = 0; i < 3; i++) {
      Button b = new Button("B" + i);
      box.add(b);
    }

    // Add a spacer between the first three buttons and the last three
    box.add(Box.createHorizontalStrut(10));
    for (int i = 3; i < 6; i++) {
      Button b = new Button("B" + i);
      box.add(b);
    }
    addWindowListener(new BasicWindowMonitor());
    setVisible(true);
  
Methods Summary
public static voidmain(java.lang.String[] args)

    HBoxWithStrut bt = new HBoxWithStrut();