RFR: 6967482: TAB-key does not work in JTables after selecting details-view in JFileChooser

Alisen Chung achung at openjdk.org
Fri Jun 14 20:23:15 UTC 2024


On Fri, 14 Jun 2024 16:00:10 GMT, Tejesh R <tr at openjdk.org> wrote:

> DetailsView removes JTable TAB, SHIFT-TAB, ENTER and SHIFT-ENTER functionalities to disable navigation within JTable of FilePane in DetailsView. This is causing the issue mentioned in the bug where on invoking DetailsView the functionalities are removed from JTable. I don't see it's effect/significance in disabling the navigation since the focus shifts outside the when TAB is presses and the folder opens when ENTER is pressed without this changed. 
> I have tested the fix on CI system, its green.

src/java.desktop/share/classes/sun/swing/FilePane.java line 1321:

> 1319: 
> 1320:         // TAB/SHIFT-TAB should transfer focus and ENTER should select an item.
> 1321:         // We don't want them to navigate within the table

what was the original purpose of this code? it seems like the code was placed here for a reason but maybe it's no longer relevant?

test/jdk/javax/swing/JFileChooser/TABTestONFCExit.java line 54:

> 52:  */
> 53: 
> 54: public class TABTestONFCExit {

why is the test name capitalized like this?

test/jdk/javax/swing/JFileChooser/TABTestONFCExit.java line 55:

> 53: 
> 54: public class TABTestONFCExit {
> 55:     private static JTable table = null;

does this jtable need to be initialized as null here?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/19725#discussion_r1640315402
PR Review Comment: https://git.openjdk.org/jdk/pull/19725#discussion_r1640316708
PR Review Comment: https://git.openjdk.org/jdk/pull/19725#discussion_r1640319162


More information about the client-libs-dev mailing list