FileDocCategorySizeDatePackage
LabelTextTest.javaAPI DocExample987Fri Jan 30 19:26:08 GMT 2004regress

LabelTextTest

public class LabelTextTest extends JPanel
Test program for LabelText class.
author
Ian Darwin, http://www.darwinsys.com/
version
$Id: LabelTextTest.java,v 1.6 2004/01/31 01:26:07 ian Exp $

Fields Summary
Constructors Summary
public LabelTextTest()
Construct the object including its GUI

		super();
		setLayout(new GridLayout(0, 1));
		JComponent foo;
		add(foo = new LabelText("Hello, and welcome to the world of Java"));
		foo.setFont(new Font("helvetica", Font.BOLD, 24));
		add(foo = new LabelText("Exit")); 
		foo.setForeground(Color.red);
	
Methods Summary
public static voidmain(java.lang.String[] argv)
"main program" method - construct and show

		JFrame f = new JFrame("LabelTextTest");
		f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		LabelTextTest testee = new LabelTextTest();
		f.setContentPane(testee);	// it is a JPanel
		f.pack();
		f.setLocation(200, 200);
		f.setVisible(true);