<Swing Dev> [10] RFR JDK-7042497: javax.swing.JOptionPane.showInternalConfirmDialog throws RuntimeException
Avik Niyogi
avik.niyogi at oracle.com
Mon May 22 05:32:41 UTC 2017
Hi,
The fix looks good to me.
With Regards,
Avik Niyogi
>
> Subject: Re: <Swing Dev> [10] RFR JDK-7042497: javax.swing.JOptionPane.showInternalConfirmDialog throws RuntimeException
> Date: Mon, 15 May 2017 15:44:17 +0530
> From: Prasanta Sadhukhan <prasanta.sadhukhan at oracle.com> <mailto:prasanta.sadhukhan at oracle.com>
> Organization: Oracle Corporation
> To: Semyon Sadetsky <semyon.sadetsky at oracle.com> <mailto:semyon.sadetsky at oracle.com>, swing-dev at openjdk.java.net <mailto:swing-dev at openjdk.java.net> <swing-dev at openjdk.java.net> <mailto:swing-dev at openjdk.java.net>
>
> Updated webrev to use getRootFrame() via createDialog() to get the default Frame when a frame is not provided.
> http://cr.openjdk.java.net/~psadhukhan/7042497/webrev.01/ <http://cr.openjdk.java.net/%7Epsadhukhan/7042497/webrev.01/>
>
> Regards
> Prasanta
> On 5/12/2017 8:08 PM, Semyon Sadetsky wrote:
>> Also the spec says to use the default frame but the fix creates new frame each time.
>>
>> On 05/12/2017 07:32 AM, Semyon Sadetsky wrote:
>>> The fix covers the parentComponent=null case.
>>> What about the second case when non-null component is provided but it has no frame?
>>>
>>> --Semyon
>>>
>>> On 05/12/2017 12:51 AM, Prasanta Sadhukhan wrote:
>>>> Hi All,
>>>>
>>>> Please review a spec violation issue whereby if in JOptionPane.showInternalConfirmDialog(Component parentComponent, Object message)
>>>> "parentComponent" is null, we are getting RuntimeException "parentComponent does not have a valid parent"
>>>>
>>>> but as per spec, https://docs.oracle.com/javase/8/docs/api/index.html?javax/swing/JOptionPane.html <https://docs.oracle.com/javase/8/docs/api/index.html?javax/swing/JOptionPane.html>
>>>> it says "parentComponent - determines the Frame in which the dialog is displayed; if null, or if the parentComponent has no Frame, a default Frame is used"
>>>>
>>>> This violation exists for all overridden showInternalConfirmDialog methods and showInternalOptionDialog.
>>>>
>>>> The proposed fix creates a default JFrame and shows the confirm dialog in it, as stated in the spec.
>>>>
>>>> Bug: https://bugs.openjdk.java.net/browse/JDK-7042497 <https://bugs.openjdk.java.net/browse/JDK-7042497>
>>>> webrev: http://cr.openjdk.java.net/~psadhukhan/7042497/webrev.00/ <http://cr.openjdk.java.net/%7Epsadhukhan/7042497/webrev.00/>
>>>>
>>>> Regards
>>>> Prasanta
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/swing-dev/attachments/20170522/9e19a635/attachment.html>
More information about the swing-dev
mailing list