Java Code Examples for javax.swing.JOptionPane.setOptions()

The following are Jave code examples for showing how to use setOptions() of the javax.swing.JOptionPane class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: JavaGraph   File:   Source Code and License Vote up 6 votes
 * Creates a modal dialog that will interrupt this thread, when the
 * cancel button is pressed.
private JDialog createCancelDialog() {
    JDialog result;
    // create message dialog
    JOptionPane message = new JOptionPane(
        isAnimated() ? getAnimationPanel()
            : new Object[] {getStateCountLabel(), getTransitionCountLabel()},
    message.setOptions(new Object[] {getCancelButton()});
    result = message.createDialog(getFrame(), "Exploring state space");
    result.addWindowListener(new WindowAdapter() {
        public void windowClosing(WindowEvent e) {
    return result;