FileDocCategorySizeDatePackage
LabelTextTest.javaAPI DocExample1025Tue Jan 29 10:56:38 GMT 2002None

LabelTextTest

public class LabelTextTest extends JComponent
Test program for LabelText class. STATUS: NOT WORKING!!
author
Ian Darwin, ian@darwinsys.com
version
$Id: LabelTextTest.java,v 1.1 2002/01/29 15:56:39 ian Exp $

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

		super();
		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[] av)
"main program" method - construct and show

		JFrame f = new JFrame("LabelTextTest");
		f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		LabelTextTest comp = new LabelTextTest();
		comp.setBackground(Color.yellow);
		Container cp = f.getContentPane();
		cp.setLayout(new FlowLayout());
		cp.add(comp);
		f.pack();
		f.setLocation(200, 200);
		f.setVisible(true);