FileDocCategorySizeDatePackage
AliasBeanTest.javaAPI DocExample1134Sun Feb 08 21:33:48 GMT 2004None

AliasBeanTest

public class AliasBeanTest extends JFrame
Test for AliasBean.
version
$Id: AliasBeanTest.java,v 1.3 2004/02/09 03:33:48 ian Exp $

Fields Summary
JButton
quitButton
Constructors Summary
public AliasBeanTest()
Construct the object including its GUI

		super("AliasBeanTest");
		Container cp = getContentPane();

		AliasBean ab = new AliasBean();
		cp.add(BorderLayout.CENTER, ab);
		ab.addAlias("ian-cvs", "ian@openbsd.org");
		ab.addAlias("ian-dos", "http://www.darwinsys.com/");

		cp.add(BorderLayout.SOUTH, quitButton = new JButton("Exit"));
		quitButton.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				setVisible(false);
				dispose();
				System.exit(0);
			}
		});
		addWindowListener(new WindowAdapter() {
			public void windowClosing(WindowEvent e) {
				setVisible(false);
				dispose();
				System.exit(0);
			}
		});
	
		pack();
	
Methods Summary
public static voidmain(java.lang.String[] av)
"main program" method - construct and show

		// create a JFrameDemo object, tell it to show up
		new AliasBeanTest().setVisible(true);