FileDocCategorySizeDatePackage
RelativeLayoutTest.javaAPI DocExample1053Sun Mar 14 14:34:12 GMT 2004regress

RelativeLayoutTest

public class RelativeLayoutTest extends JFrame
Simple class to non-exhaustively test out RelativeLayout layout manager.

Fields Summary
Button
adButton
Button
qb
Constructors Summary
public RelativeLayoutTest()
Construct a RelativeLayoutTest test program.

		super("RelativeLayout Tester");
		Container cp = getContentPane();
		cp.setLayout(new RelativeLayout(300, 150));
		cp.add("80,20", adButton = new Button("MidWidth"));
		cp.add("150,75", qb = new Button("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 RelativeLayout. Invoke directly from Java interpreter.

		RelativeLayoutTest f = new RelativeLayoutTest();
		f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		f.setVisible(true);