FileDocCategorySizeDatePackage
YesNoDlgTest.javaAPI DocExample1053Tue Feb 27 14:23:26 GMT 2001None

YesNoDlgTest

public class YesNoDlgTest extends Frame
Template standalone GUI application

Fields Summary
boolean
unsavedChanges
Button
quitButton
Constructors Summary
public YesNoDlgTest()
Construct the object including its GUI


	       
	  
		super("YesNoDlgTest");
		setLayout(new FlowLayout());
		add(new Label("Hello, and welcome to the world of Java"));
		add(quitButton = new Button("Test"));
		quitButton.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				new YesNoDialog(YesNoDlgTest.this, "Testing", "Which Microsoft ad do you want to ignore today?", "All", "None", "Cancel").setVisible(true);
			}
		});
		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

		// create a YesNoDlgTest object
		YesNoDlgTest j = new YesNoDlgTest();
		// send message telling it to show up
		j.setVisible(true);