FileDocCategorySizeDatePackage
ColumnLayoutTest.javaAPI DocExample1290Sun Jun 22 19:19:12 BST 2003regress

ColumnLayoutTest

public class ColumnLayoutTest extends JFrame
Simple class to non-exhaustively test out RelLayout layout manager.

Fields Summary
JButton
adButton
JButton
qb
Constructors Summary
ColumnLayoutTest(int alignment, int hpad, int vpad)
Construct a Test test program.

		super("Column Layout Tester");
		Container cp = getContentPane();
		ColumnLayout cl = new ColumnLayout(alignment, hpad, vpad);
		cp.setLayout(cl);
		cp.add(new JButton("X"));
		cp.add(new JButton("MidWidth"));
		cp.add(new JButton("A Long Button"));
		cl.addSpacer(cp);
		cp.add(qb = new JButton("Quit"));
		qb.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				System.exit(0);
			}
		});
		pack();
	
Methods Summary
public static voidmain(java.lang.String[] av)
Simple main program to test out RelLayout. Invoke directly from Java interpreter.

		new ColumnLayoutTest(ColumnLayout.X_AXIS, 0, 0).setVisible(true);
		new ColumnLayoutTest(ColumnLayout.Y_AXIS, 0, 0).setVisible(true);
		new ColumnLayoutTest(ColumnLayout.X_AXIS, 10, 10).setVisible(true);
		new ColumnLayoutTest(ColumnLayout.Y_AXIS, 10, 10).setVisible(true);