RFR: JDK-7154070: in SwingSet2, switching between LaFs it's easy to lose JTable dividers [v4]

Jayathirth D V jdv at openjdk.org
Mon Feb 6 05:59:50 UTC 2023


On Thu, 2 Feb 2023 17:39:53 GMT, Prasanta Sadhukhan <psadhukhan at openjdk.org> wrote:

>> In SwingSet2 in TableDemo, we can see grid dividers in Metal L&F but 
>> if we Switch to the Nimbus LaF which has no grid dividers by default and then if we switch to Java (Metal): it will show no dividers.
>> 
>> Issue is Nimbus call JTable.showGrid(false) in installDefaults but fail to reset in uninstallDefaults which is now rectified.
>> 
>> No regression test is added as it can be verified by SwingSet2 Tabledemo..
>
> Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision:
> 
>   test fix

src/java.desktop/share/classes/javax/swing/plaf/synth/SynthTableUI.java line 234:

> 232:         }
> 233:         SynthContext context = getContext(table, ENABLED);
> 234:         if (showHorizLines) {

I think we should make this condition tighter to avoid unnecessary repaints like in GTK LAF.
Like only when current property is false and we expect it to be true and then only call setShowHorizontal/VerticalLines()

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

PR: https://git.openjdk.org/jdk/pull/12385



More information about the client-libs-dev mailing list