RFR: 8216471: GTK LnF: Frame is clipped and does not show JTable,Tooltip and JTree demo in SwingSet2 demo [v2]

Abhishek Kumar abhiscxk at openjdk.org
Thu Jul 11 04:02:55 UTC 2024


On Wed, 10 Jul 2024 20:38:48 GMT, Alisen Chung <achung at openjdk.org> wrote:

>> Abhishek Kumar has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Frame size change for GTK L&F only
>
> src/demo/share/jfc/SwingSet2/SwingSet2.java line 852:
> 
>> 850:         } else {
>> 851:             if (currentLookAndFeel.name.contains("GTK")) {
>> 852:                 frame.setSize(980, 870);
> 
> why do you update the size here instead of above where the original code sets the preferred size of the demo?

Preferred size is set only when the demo is initialized and it remains of the same size for all the L&F and that results in clipping of few demos for GTK L&F. The solution is to change the preferred width and height for all the L&F as it was done in the initial fix but @prsadhuk suggested [here](https://github.com/openjdk/jdk/pull/20052#issuecomment-2217287962) to change the size only for GTK L&F as frame size for other L&F doesn't clip the demos.

So, whenever the L&F is set to GTK, the frame size is modified to handle the clipping and restore the original size if the L&F is set to other than GTK.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/20052#discussion_r1673369067


More information about the client-libs-dev mailing list