You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Chunrong Lai (JIRA)" <ji...@apache.org> on 2007/08/09 09:17:44 UTC

[jira] Created: (HARMONY-4613) [classlib][swing] SetOptions/SetMessage of JOptionPane not implemented

[classlib][swing] SetOptions/SetMessage of JOptionPane not implemented
----------------------------------------------------------------------

                 Key: HARMONY-4613
                 URL: https://issues.apache.org/jira/browse/HARMONY-4613
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
         Environment: win32
            Reporter: Chunrong Lai



Here's the simple test demonstrating the problem: 

import javax.swing.*;

public class OptionPaneTest {
  public static void main(String[] args) {
        JFrame frame = new JFrame("OPTest");
        JButton yesButton = new JButton("Yes");
        JButton noButton = new JButton("No");
        JButton[]   buttons = {yesButton, noButton};

        JDialog dialog = new JDialog(frame, true);
        dialog.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
        JOptionPane optionPane = new JOptionPane();;
        optionPane.setMessageType(JOptionPane.PLAIN_MESSAGE);

        optionPane.setOptions(buttons);
        optionPane.setMessage("Can we show the dislog?");

        dialog.setTitle("JOptionPane Test");
        dialog.getContentPane().add(optionPane);
        dialog.pack();
        dialog.setLocationRelativeTo(dialog.getParent());
        dialog.show();
  }
}

 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (HARMONY-4613) [classlib][swing] SetOptions/SetMessage of JOptionPane not implemented

Posted by "Alexey Petrenko (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-4613?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexey Petrenko resolved HARMONY-4613.
--------------------------------------

    Resolution: Fixed

The new patch has been applied.
Please, verify.

> [classlib][swing] SetOptions/SetMessage of JOptionPane not implemented
> ----------------------------------------------------------------------
>
>                 Key: HARMONY-4613
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4613
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>         Environment: win32
>            Reporter: Chunrong Lai
>            Assignee: Alexey Petrenko
>         Attachments: HARMONY-4613-BasicOptionPaneUI.patch, HARMONY-4613.patch, Harmony.jpg, RI.JPG
>
>
> Here's the simple test demonstrating the problem: 
> import javax.swing.*;
> public class OptionPaneTest {
>   public static void main(String[] args) {
>         JFrame frame = new JFrame("OPTest");
>         JButton yesButton = new JButton("Yes");
>         JButton noButton = new JButton("No");
>         JButton[]   buttons = {yesButton, noButton};
>         JDialog dialog = new JDialog(frame, true);
>         dialog.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
>         JOptionPane optionPane = new JOptionPane();;
>         optionPane.setMessageType(JOptionPane.PLAIN_MESSAGE);
>         optionPane.setOptions(buttons);
>         optionPane.setMessage("Can we show the dislog?");
>         dialog.setTitle("JOptionPane Test");
>         dialog.getContentPane().add(optionPane);
>         dialog.pack();
>         dialog.setLocationRelativeTo(dialog.getParent());
>         dialog.show();
>   }
> }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (HARMONY-4613) [classlib][swing] SetOptions/SetMessage of JOptionPane not implemented

Posted by "Alexey Petrenko (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-4613?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexey Petrenko resolved HARMONY-4613.
--------------------------------------

    Resolution: Fixed

Thanks, Ilya.

The patch has been applied.

Chunrong, please verify.

> [classlib][swing] SetOptions/SetMessage of JOptionPane not implemented
> ----------------------------------------------------------------------
>
>                 Key: HARMONY-4613
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4613
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>         Environment: win32
>            Reporter: Chunrong Lai
>            Assignee: Alexey Petrenko
>         Attachments: HARMONY-4613.patch, Harmony.jpg, RI.JPG
>
>
> Here's the simple test demonstrating the problem: 
> import javax.swing.*;
> public class OptionPaneTest {
>   public static void main(String[] args) {
>         JFrame frame = new JFrame("OPTest");
>         JButton yesButton = new JButton("Yes");
>         JButton noButton = new JButton("No");
>         JButton[]   buttons = {yesButton, noButton};
>         JDialog dialog = new JDialog(frame, true);
>         dialog.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
>         JOptionPane optionPane = new JOptionPane();;
>         optionPane.setMessageType(JOptionPane.PLAIN_MESSAGE);
>         optionPane.setOptions(buttons);
>         optionPane.setMessage("Can we show the dislog?");
>         dialog.setTitle("JOptionPane Test");
>         dialog.getContentPane().add(optionPane);
>         dialog.pack();
>         dialog.setLocationRelativeTo(dialog.getParent());
>         dialog.show();
>   }
> }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-4613) [classlib][swing] SetOptions/SetMessage of JOptionPane not implemented

Posted by "Chunrong Lai (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-4613?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chunrong Lai updated HARMONY-4613:
----------------------------------

    Attachment: RI.JPG
                Harmony.jpg

> [classlib][swing] SetOptions/SetMessage of JOptionPane not implemented
> ----------------------------------------------------------------------
>
>                 Key: HARMONY-4613
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4613
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>         Environment: win32
>            Reporter: Chunrong Lai
>         Attachments: Harmony.jpg, RI.JPG
>
>
> Here's the simple test demonstrating the problem: 
> import javax.swing.*;
> public class OptionPaneTest {
>   public static void main(String[] args) {
>         JFrame frame = new JFrame("OPTest");
>         JButton yesButton = new JButton("Yes");
>         JButton noButton = new JButton("No");
>         JButton[]   buttons = {yesButton, noButton};
>         JDialog dialog = new JDialog(frame, true);
>         dialog.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
>         JOptionPane optionPane = new JOptionPane();;
>         optionPane.setMessageType(JOptionPane.PLAIN_MESSAGE);
>         optionPane.setOptions(buttons);
>         optionPane.setMessage("Can we show the dislog?");
>         dialog.setTitle("JOptionPane Test");
>         dialog.getContentPane().add(optionPane);
>         dialog.pack();
>         dialog.setLocationRelativeTo(dialog.getParent());
>         dialog.show();
>   }
> }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-4613) [classlib][swing] SetOptions/SetMessage of JOptionPane not implemented

Posted by "Andrey Pavlenko (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-4613?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrey Pavlenko updated HARMONY-4613:
-------------------------------------

    Attachment: HARMONY-4613-BasicOptionPaneUI.patch
                HARMONY-4613-revert.patch

Could someone roll back the previous fix and apply this one instead? This patch modifies BasicOptionPaneUI to perform all required updates from the corresponding event listener instead of UI reinstalling.

> [classlib][swing] SetOptions/SetMessage of JOptionPane not implemented
> ----------------------------------------------------------------------
>
>                 Key: HARMONY-4613
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4613
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>         Environment: win32
>            Reporter: Chunrong Lai
>            Assignee: Alexey Petrenko
>         Attachments: HARMONY-4613-BasicOptionPaneUI.patch, HARMONY-4613-revert.patch, HARMONY-4613.patch, Harmony.jpg, RI.JPG
>
>
> Here's the simple test demonstrating the problem: 
> import javax.swing.*;
> public class OptionPaneTest {
>   public static void main(String[] args) {
>         JFrame frame = new JFrame("OPTest");
>         JButton yesButton = new JButton("Yes");
>         JButton noButton = new JButton("No");
>         JButton[]   buttons = {yesButton, noButton};
>         JDialog dialog = new JDialog(frame, true);
>         dialog.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
>         JOptionPane optionPane = new JOptionPane();;
>         optionPane.setMessageType(JOptionPane.PLAIN_MESSAGE);
>         optionPane.setOptions(buttons);
>         optionPane.setMessage("Can we show the dislog?");
>         dialog.setTitle("JOptionPane Test");
>         dialog.getContentPane().add(optionPane);
>         dialog.pack();
>         dialog.setLocationRelativeTo(dialog.getParent());
>         dialog.show();
>   }
> }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-4613) [classlib][swing] SetOptions/SetMessage of JOptionPane not implemented

Posted by "ilya ivanov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-4613?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

ilya ivanov updated HARMONY-4613:
---------------------------------

    Attachment: HARMONY-4613.patch

the attached file corrects SET* methods(inclluding setMessage and setOption) of the JOptionPane class by adding updateUI() method at the end of each SET* method. Without it, calls of those methods doesn't take effect instantly but only after recurring initialisation.

> [classlib][swing] SetOptions/SetMessage of JOptionPane not implemented
> ----------------------------------------------------------------------
>
>                 Key: HARMONY-4613
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4613
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>         Environment: win32
>            Reporter: Chunrong Lai
>         Attachments: HARMONY-4613.patch, Harmony.jpg, RI.JPG
>
>
> Here's the simple test demonstrating the problem: 
> import javax.swing.*;
> public class OptionPaneTest {
>   public static void main(String[] args) {
>         JFrame frame = new JFrame("OPTest");
>         JButton yesButton = new JButton("Yes");
>         JButton noButton = new JButton("No");
>         JButton[]   buttons = {yesButton, noButton};
>         JDialog dialog = new JDialog(frame, true);
>         dialog.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
>         JOptionPane optionPane = new JOptionPane();;
>         optionPane.setMessageType(JOptionPane.PLAIN_MESSAGE);
>         optionPane.setOptions(buttons);
>         optionPane.setMessage("Can we show the dislog?");
>         dialog.setTitle("JOptionPane Test");
>         dialog.getContentPane().add(optionPane);
>         dialog.pack();
>         dialog.setLocationRelativeTo(dialog.getParent());
>         dialog.show();
>   }
> }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Reopened: (HARMONY-4613) [classlib][swing] SetOptions/SetMessage of JOptionPane not implemented

Posted by "Alexey Petrenko (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-4613?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexey Petrenko reopened HARMONY-4613:
--------------------------------------


Thanks, Andrey.

> [classlib][swing] SetOptions/SetMessage of JOptionPane not implemented
> ----------------------------------------------------------------------
>
>                 Key: HARMONY-4613
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4613
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>         Environment: win32
>            Reporter: Chunrong Lai
>            Assignee: Alexey Petrenko
>         Attachments: HARMONY-4613-BasicOptionPaneUI.patch, HARMONY-4613-revert.patch, HARMONY-4613.patch, Harmony.jpg, RI.JPG
>
>
> Here's the simple test demonstrating the problem: 
> import javax.swing.*;
> public class OptionPaneTest {
>   public static void main(String[] args) {
>         JFrame frame = new JFrame("OPTest");
>         JButton yesButton = new JButton("Yes");
>         JButton noButton = new JButton("No");
>         JButton[]   buttons = {yesButton, noButton};
>         JDialog dialog = new JDialog(frame, true);
>         dialog.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
>         JOptionPane optionPane = new JOptionPane();;
>         optionPane.setMessageType(JOptionPane.PLAIN_MESSAGE);
>         optionPane.setOptions(buttons);
>         optionPane.setMessage("Can we show the dislog?");
>         dialog.setTitle("JOptionPane Test");
>         dialog.getContentPane().add(optionPane);
>         dialog.pack();
>         dialog.setLocationRelativeTo(dialog.getParent());
>         dialog.show();
>   }
> }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-4613) [classlib][swing] SetOptions/SetMessage of JOptionPane not implemented

Posted by "Alexey Petrenko (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-4613?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexey Petrenko updated HARMONY-4613:
-------------------------------------

    Patch Info: [Patch Available]

> [classlib][swing] SetOptions/SetMessage of JOptionPane not implemented
> ----------------------------------------------------------------------
>
>                 Key: HARMONY-4613
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4613
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>         Environment: win32
>            Reporter: Chunrong Lai
>            Assignee: Alexey Petrenko
>         Attachments: HARMONY-4613.patch, Harmony.jpg, RI.JPG
>
>
> Here's the simple test demonstrating the problem: 
> import javax.swing.*;
> public class OptionPaneTest {
>   public static void main(String[] args) {
>         JFrame frame = new JFrame("OPTest");
>         JButton yesButton = new JButton("Yes");
>         JButton noButton = new JButton("No");
>         JButton[]   buttons = {yesButton, noButton};
>         JDialog dialog = new JDialog(frame, true);
>         dialog.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
>         JOptionPane optionPane = new JOptionPane();;
>         optionPane.setMessageType(JOptionPane.PLAIN_MESSAGE);
>         optionPane.setOptions(buttons);
>         optionPane.setMessage("Can we show the dislog?");
>         dialog.setTitle("JOptionPane Test");
>         dialog.getContentPane().add(optionPane);
>         dialog.pack();
>         dialog.setLocationRelativeTo(dialog.getParent());
>         dialog.show();
>   }
> }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-4613) [classlib][swing] SetOptions/SetMessage of JOptionPane not implemented

Posted by "Andrey Pavlenko (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-4613?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12521736 ] 

Andrey Pavlenko commented on HARMONY-4613:
------------------------------------------

This fix caused a regression. To reproduce it use the following code:

import javax.swing.JFrame;
import javax.swing.JOptionPane;

public class SwingTest {

	public static void main(String[] args) {
		JFrame f = new JFrame();
		JOptionPane.showMessageDialog(f, "Push the below button");
		f.dispose();
	}
}

After pressing the "OK" button NPE in the EventDispatchThread occures:

java.lang.NullPointerException
	at javax.swing.plaf.basic.BasicOptionPaneUI$ButtonActionListener.actionPerformed(BasicOptionPaneUI.java:274)
	at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:704)
	at javax.swing.AbstractButton$ActionAndModelListener.actionPerformed(AbstractButton.java:241)
	at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:220)
	at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:152)
	at javax.swing.plaf.basic.BasicButtonListener$ReleaseButtonAction.release(BasicButtonListener.java:68)
	at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:126)
	at java.awt.Component.processMouseEventImpl(Component.java:3973)
	at java.awt.Component.processMouseEvent(Component.java:3954)
	at java.awt.Component.processEvent(Component.java:3637)
	at java.awt.Container.processEvent(Container.java:1293)
	at java.awt.Component.dispatchEvent(Component.java:3547)
	at java.awt.EventQueueCore.dispatchEventImpl(EventQueueCore.java:149)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:144)
	at java.awt.EventDispatchThread.runModalLoop(EventDispatchThread.java:68)
	at java.awt.ModalContext.runModalLoop(ModalContext.java:43)
	at java.awt.Dialog$DialogModalContext.runModalLoop(Dialog.java:41)
	at java.awt.Dialog.showModal(Dialog.java:362)
	at java.awt.Dialog.access$0(Dialog.java:351)
	at java.awt.Dialog$1.run(Dialog.java:254)
	at java.awt.event.InvocationEvent.runAndNotify(InvocationEvent.java:92)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:81)
	at java.awt.EventQueueCore.dispatchEventImpl(EventQueueCore.java:138)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:144)
	at java.awt.EventDispatchThread.runModalLoop(EventDispatchThread.java:68)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:48)

It happens because the method javax.swing.JOptionPane.setValue(Object), you've modified,  is used by the event listener associated with the current instance of BasicOptionPaneUI (method BasicOptionPaneUI$ButtonActionListener.actionPerformed()). The method updateUI(), which you've added to the end of setValue(), uninstalls the current UI and replaces it with a new instance of BasicOptionPaneUI. Thus, we have a situation when during event processing the listener uninstalls UI and after that tries to modify it. This is the cause of NPE.


> [classlib][swing] SetOptions/SetMessage of JOptionPane not implemented
> ----------------------------------------------------------------------
>
>                 Key: HARMONY-4613
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4613
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>         Environment: win32
>            Reporter: Chunrong Lai
>            Assignee: Alexey Petrenko
>         Attachments: HARMONY-4613.patch, Harmony.jpg, RI.JPG
>
>
> Here's the simple test demonstrating the problem: 
> import javax.swing.*;
> public class OptionPaneTest {
>   public static void main(String[] args) {
>         JFrame frame = new JFrame("OPTest");
>         JButton yesButton = new JButton("Yes");
>         JButton noButton = new JButton("No");
>         JButton[]   buttons = {yesButton, noButton};
>         JDialog dialog = new JDialog(frame, true);
>         dialog.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
>         JOptionPane optionPane = new JOptionPane();;
>         optionPane.setMessageType(JOptionPane.PLAIN_MESSAGE);
>         optionPane.setOptions(buttons);
>         optionPane.setMessage("Can we show the dislog?");
>         dialog.setTitle("JOptionPane Test");
>         dialog.getContentPane().add(optionPane);
>         dialog.pack();
>         dialog.setLocationRelativeTo(dialog.getParent());
>         dialog.show();
>   }
> }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-4613) [classlib][swing] SetOptions/SetMessage of JOptionPane not implemented

Posted by "Alexey Petrenko (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-4613?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexey Petrenko updated HARMONY-4613:
-------------------------------------

    Attachment:     (was: HARMONY-4613-revert.patch)

> [classlib][swing] SetOptions/SetMessage of JOptionPane not implemented
> ----------------------------------------------------------------------
>
>                 Key: HARMONY-4613
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4613
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>         Environment: win32
>            Reporter: Chunrong Lai
>            Assignee: Alexey Petrenko
>         Attachments: HARMONY-4613-BasicOptionPaneUI.patch, HARMONY-4613.patch, Harmony.jpg, RI.JPG
>
>
> Here's the simple test demonstrating the problem: 
> import javax.swing.*;
> public class OptionPaneTest {
>   public static void main(String[] args) {
>         JFrame frame = new JFrame("OPTest");
>         JButton yesButton = new JButton("Yes");
>         JButton noButton = new JButton("No");
>         JButton[]   buttons = {yesButton, noButton};
>         JDialog dialog = new JDialog(frame, true);
>         dialog.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
>         JOptionPane optionPane = new JOptionPane();;
>         optionPane.setMessageType(JOptionPane.PLAIN_MESSAGE);
>         optionPane.setOptions(buttons);
>         optionPane.setMessage("Can we show the dislog?");
>         dialog.setTitle("JOptionPane Test");
>         dialog.getContentPane().add(optionPane);
>         dialog.pack();
>         dialog.setLocationRelativeTo(dialog.getParent());
>         dialog.show();
>   }
> }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (HARMONY-4613) [classlib][swing] SetOptions/SetMessage of JOptionPane not implemented

Posted by "Alexey Petrenko (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-4613?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexey Petrenko reassigned HARMONY-4613:
----------------------------------------

    Assignee: Alexey Petrenko

> [classlib][swing] SetOptions/SetMessage of JOptionPane not implemented
> ----------------------------------------------------------------------
>
>                 Key: HARMONY-4613
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4613
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>         Environment: win32
>            Reporter: Chunrong Lai
>            Assignee: Alexey Petrenko
>         Attachments: HARMONY-4613.patch, Harmony.jpg, RI.JPG
>
>
> Here's the simple test demonstrating the problem: 
> import javax.swing.*;
> public class OptionPaneTest {
>   public static void main(String[] args) {
>         JFrame frame = new JFrame("OPTest");
>         JButton yesButton = new JButton("Yes");
>         JButton noButton = new JButton("No");
>         JButton[]   buttons = {yesButton, noButton};
>         JDialog dialog = new JDialog(frame, true);
>         dialog.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
>         JOptionPane optionPane = new JOptionPane();;
>         optionPane.setMessageType(JOptionPane.PLAIN_MESSAGE);
>         optionPane.setOptions(buttons);
>         optionPane.setMessage("Can we show the dislog?");
>         dialog.setTitle("JOptionPane Test");
>         dialog.getContentPane().add(optionPane);
>         dialog.pack();
>         dialog.setLocationRelativeTo(dialog.getParent());
>         dialog.show();
>   }
> }
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.