FileDocCategorySizeDatePackage
JOptionPaneDemonstration.javaAPI DocExample943Wed Jan 17 20:10:12 GMT 2001None

JOptionPaneDemonstration

public class JOptionPaneDemonstration extends Object

Fields Summary
Constructors Summary
Methods Summary
public static voidmain(java.lang.String[] argv)


    JOptionPane jop = new JOptionPane(
        "This is a message", JOptionPane.ERROR_MESSAGE,
        JOptionPane.YES_NO_CANCEL_OPTION);
    JDialog jopDialog = jop.createDialog(null, "This is a title");
    jopDialog.show();
    Object userSelection = jop.getValue();
    // NOTE: The return value returned by the above statement is an int
    System.exit(0);