FileDocCategorySizeDatePackage
LabelTextTest.javaAPI DocExample959Sat Jan 27 21:38:42 GMT 2001None

LabelTextTest

public class LabelTextTest extends Object
Simple test for LabelText.
version
$Id: LabelTextTest.java,v 1.3 2001/01/28 02:38:43 ian Exp $

Fields Summary
Constructors Summary
Methods Summary
public static voidmain(java.lang.String[] av)
"main program" for testing - construct and show

		// create a LabelText object, tell it to show up
		final JFrame f = new JFrame("LabelText");
		Container cp = f.getContentPane();
		cp.setLayout(new BoxLayout(cp, BoxLayout.Y_AXIS));

		LabelText comp;
		comp = new LabelText("Test");
		comp.setLabelAlignment(JLabel.LEFT);
		comp.setText("Hello world");
		cp.add(comp);
		comp = new LabelText("Test 2");
		comp.setLabelAlignment(JLabel.CENTER);
		cp.add(comp);
		comp = new LabelText("Test 3");
		comp.setLabelAlignment(JLabel.RIGHT);
		comp.setText("Entry area");
		cp.add(comp);

		f.addWindowListener(new WindowCloser(f));
		f.pack();
		f.setLocation(200, 200);
		f.setVisible(true);