FileDocCategorySizeDatePackage
AliasBeanTest.javaAPI DocExample1126Sat Nov 25 12:54:58 GMT 2000None

AliasBeanTest

public class AliasBeanTest extends JFrame
Test for AliasBean.
version
$Id: AliasBeanTest.java,v 1.2 2000/11/25 17:54:58 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", "ian@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);