<AWT Dev> Review request for 6429675: getMaximumsize() size of the frame less than the minimumsize of Frame.

Ambarish Rapte ambarish.rapte at oracle.com
Fri Apr 29 14:09:26 UTC 2016


 

Hi,

                Please review the fix for JDK 9,

                Bug: https://bugs.openjdk.java.net/browse/JDK-6429675

                Webrev: http://cr.openjdk.java.net/~arapte/6429675/webrev.00/

 

 

Issue:

1.       setMaximumSize() can set maximum size of a Frame smaller than minimumSize of frame.

2.       setMinimumSize()  can set minimum size of a Frame greater than maximumSize of frame.

 

 

Fix:

                These are sizes are used for layout. In addition there is third size named preferred size.

                Preferred size is only suggestion & not mandatory size, hence this change does not consider modifying preferred size.

 

                Maximum size is neglected in layout logic.

                Hence we decided that, minimum size should hold the priority.

 

                Current fix is: Always maintain maximum size greater or equal to minimum size.

                i.e.

                1. If minimum size is set to a size greater than maximum size,  then update the maximum size to same as new minimum size.

                2. If maximum size is set to a size smaller than minimum size,  then update the maximum size to same as current minimum size.

        

 

                There is also API doc change, as per the new behavior.

 

 

Verification:

                Verified regression and JCK tests of Frame & Layout.

                No failures due to this fix.

 

 

Regards,

Ambarish

 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/awt-dev/attachments/20160429/31247ff3/attachment-0001.html>


More information about the awt-dev mailing list