FileDocCategorySizeDatePackage
DialogWindow.javaAPI DocExample2945Sat Sep 12 03:01:00 BST 1998None

DialogWindow

public class DialogWindow extends Frame implements WindowListener, ActionListener

Fields Summary
private boolean
inAnApplet
private SimpleDialog
dialog
private TextArea
textArea
Constructors Summary
public DialogWindow()


      
        textArea = new TextArea(5, 40);
        textArea.setEditable(false);
        add("Center", textArea);
        Button button = new Button("Click to bring up dialog");
	button.addActionListener(this);
        Panel panel = new Panel();
        panel.add(button);
        add("South", panel);
	addWindowListener(this);
    
Methods Summary
public voidactionPerformed(java.awt.event.ActionEvent event)

        if (dialog == null) {
            dialog = new SimpleDialog(this, "A Simple Dialog");
        }
        dialog.setVisible(true);
    
public static voidmain(java.lang.String[] args)

        DialogWindow window = new DialogWindow();
        window.inAnApplet = false;

        window.setTitle("DialogWindow Application");
        window.pack();
        window.setVisible(true);
    
public voidsetText(java.lang.String text)

        textArea.append(text + "\n");
    
public voidwindowActivated(java.awt.event.WindowEvent event)

    
public voidwindowClosed(java.awt.event.WindowEvent event)

    
public voidwindowClosing(java.awt.event.WindowEvent event)

        if (inAnApplet) {
            dispose();
        } else {
            System.exit(0);
        }
    
public voidwindowDeactivated(java.awt.event.WindowEvent event)

    
public voidwindowDeiconified(java.awt.event.WindowEvent event)

    
public voidwindowIconified(java.awt.event.WindowEvent event)

    
public voidwindowOpened(java.awt.event.WindowEvent event)