RFR: 8301606: JFileChooser file chooser details view "size" label cut off in Metal Look&Feel

Abhishek Kumar abhiscxk at openjdk.org
Wed Jun 14 09:41:58 UTC 2023


On Wed, 14 Jun 2023 09:17:06 GMT, Tejesh R <tr at openjdk.org> wrote:

> "size" label which is _RIGHT_ aligned is cut off on header cell. The issue is not only w.r.t to `JFileChooser` rather it is part of `JTable`. The root caused is found to be that in metal L&F the border insets is set to `(2,2,2,0)` meaning the right most inset value is 0. Hence when UIScaling increases the issue will be visible clearly. The fix addresses the issue by setting the right `inset` to 2 similar to other `inset` values. (Though the reason for setting it to 0 is unclear since it was initial load). 
> CI testing shows green.
> After the fix at 225% scaling:
> ![image](https://github.com/openjdk/jdk/assets/94159358/f3e5a88a-1710-4ee0-84aa-338bc93010b2)

test/jdk/javax/swing/JFileChooser/FileChooserSizeLabelCutOffTest.java line 102:

> 100:         frame.pack();
> 101:         frame.setVisible(true);
> 102:     }

Please add a blank line between method implementation.

test/jdk/javax/swing/JFileChooser/FileChooserSizeLabelCutOffTest.java line 111:

> 109:         detailsBtn.doClick();
> 110:     }
> 111:     private static AbstractButton findDetailsButton(final Container container) {

Please add a blank line here as well.

test/jdk/javax/swing/JFileChooser/FileChooserSizeLabelCutOffTest.java line 118:

> 116:     }
> 117: 
> 118:     private static JTable findTable(final Container container) {

This method is not called at any place, can it be removed?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/14464#discussion_r1229315240
PR Review Comment: https://git.openjdk.org/jdk/pull/14464#discussion_r1229315941
PR Review Comment: https://git.openjdk.org/jdk/pull/14464#discussion_r1229316858



More information about the client-libs-dev mailing list