<Swing Dev> [10][JDK-6714836] JRootPane.getMaximumSize() returns a width of 0
Krishna Addepalli
krishna.addepalli at oracle.com
Tue Sep 12 12:09:24 UTC 2017
Hi Sergey,
Point taken. Did the relevant changes and created a new webrev:
http://cr.openjdk.java.net/~pkbalakr/Krishna/6714836/webrev04/
Thanks,
Krishna
-----Original Message-----
From: Sergey Bylokhov
Sent: Tuesday, September 12, 2017 1:03 AM
To: Krishna Addepalli <krishna.addepalli at oracle.com>; Prasanta Sadhukhan <prasanta.sadhukhan at oracle.com>; swing-dev at openjdk.java.net
Subject: Re: <Swing Dev> [10][JDK-6714836] JRootPane.getMaximumSize() returns a width of 0
Hi, Krishna
Please use SwingUtilities.invokeAndWait() instead of invokeLater().
- invokeAndWait() will wait while code is executed.
- invokeLater() can start execution when the main() method is ended, so the jtreg will kill EDT before the test will do something useful.
On 9/10/17 22:03, Krishna Addepalli wrote:
> Hi Prasanta/Sergey,
>
> I have updated the webrev based on your recommendations:
>
> http://cr.openjdk.java.net/~pkbalakr/Krishna/6714836/webrev03/
>
> Thanks,
> Krishna
>
> -----Original Message-----
> From: Sergey Bylokhov
> Sent: Tuesday, September 5, 2017 8:04 PM
> To: Prasanta Sadhukhan <prasanta.sadhukhan at oracle.com>; Krishna
> Addepalli <krishna.addepalli at oracle.com>; swing-dev at openjdk.java.net
> Subject: Re: <Swing Dev> [10][JDK-6714836] JRootPane.getMaximumSize()
> returns a width of 0
>
> One more note: the Swing components should be accessed on EDT.
>
> On 9/5/17 03:26, Prasanta Sadhukhan wrote:
>> +1. Just one thing, you can modify the testcase to use specific
>> +imports
>> rather that wildcard imports.
>>
>> Regards
>> Prasanta
>> On 9/5/2017 3:26 PM, Krishna Addepalli wrote:
>>>
>>> Done that!
>>>
>>> http://cr.openjdk.java.net/~pkbalakr/Krishna/6714836/webrev02/
>>> <http://cr.openjdk.java.net/%7Epkbalakr/Krishna/6714836/webrev02/>
>>> is the updated webrev.
>>>
>>> Thanks,
>>>
>>> Krishna
>>>
>>> *From:*Prasanta Sadhukhan
>>> *Sent:* Monday, September 4, 2017 5:45 PM
>>> *To:* Krishna Addepalli <krishna.addepalli at oracle.com>;
>>> swing-dev at openjdk.java.net
>>> *Subject:* Re: <Swing Dev> [10][JDK-6714836]
>>> JRootPane.getMaximumSize() returns a width of 0
>>>
>>> Looks fine. But, remove @author tag as we do not use it anymore.
>>> Also, @modules tag is used to add some internal modules if test
>>> needs one, here it is not needed, so you remove that too. Add @run tag.
>>>
>>> Regards
>>> Prasanta
>>>
>>> On 9/4/2017 3:46 PM, Krishna Addepalli wrote:
>>>
>>> Hi Prasanta,
>>>
>>> Thanks for bringing that up. I have updated the webrev with the
>>> test case.
>>>
>>> JDK 10 Webrev:
>>> http://cr.openjdk.java.net/~pkbalakr/Krishna/6714836/webrev.01/
>>>
>>> <http://cr.openjdk.java.net/%7Epkbalakr/Krishna/6714836/webrev.01/>
>>>
>>> Krishna
>>>
>>> *From:*Prasanta Sadhukhan
>>> *Sent:* Thursday, August 24, 2017 1:50 PM
>>> *To:* Krishna Addepalli <krishna.addepalli at oracle.com>
>>> <mailto:krishna.addepalli at oracle.com>; swing-dev at openjdk.java.net
>>> <mailto:swing-dev at openjdk.java.net>
>>> *Subject:* Re: <Swing Dev> [10][JDK-6714836]
>>> JRootPane.getMaximumSize() returns a width of 0
>>>
>>> You can add a regression test with the fix as JBS already has one.
>>>
>>> Regards
>>> Prasanta
>>>
>>> On 8/24/2017 12:37 PM, Krishna Addepalli wrote:
>>>
>>> Hi All,
>>>
>>> Bug : JDK- 6714836
>>> <https://bugs.openjdk.java.net/browse/JDK-6714836>
>>> <%3chttps:/bugs.openjdk.java.net/browse/JDK-6714836%3e>
>>>
>>> JDK 10 Webrev:
>>>
>>> http://cr.openjdk.java.net/~pkbalakr/Krishna/6714836/webrev00/
>>>
>>> <http://cr.openjdk.java.net/%7Epkbalakr/Krishna/6714836/webrev00/>
>>>
>>> The issue is that when a text label is added to JRootPane and
>>> query the maximumLayoutSize, it is returning 0. The root cause
>>> is because, JRootPane decides to provide the Minimum width of
>>> Menubar (which in this case is 0) and the content pane (which
>>> contains the JLabel). Actually, it should return the maximum
>>> of the two, since that is what is the layout size needed.
>>>
>>> Thanks,
>>>
>>> Krishna
>>>
>>
>
>
> --
> Best regards, Sergey.
>
--
Best regards, Sergey.
More information about the swing-dev
mailing list