Skip to content

Commit fc54784

Browse files
committed
8258554: javax/swing/JTable/4235420/bug4235420.java fails in GTK L&F
Backport-of: c7c53d0
1 parent bf7c965 commit fc54784

File tree

2 files changed

+25
-12
lines changed

2 files changed

+25
-12
lines changed

test/jdk/ProblemList.txt

-1
Original file line numberDiff line numberDiff line change
@@ -697,7 +697,6 @@ javax/swing/JComboBox/8033069/bug8033069ScrollBar.java 8163367 generic-all
697697
javax/swing/JColorChooser/Test6827032.java 8197825 windows-all
698698
javax/swing/JColorChooser/Test7194184.java 8194126 linux-all,macosx-all
699699
javax/swing/JTable/7124218/SelectEditTableCell.java 8148958 linux-all,macosx-all
700-
javax/swing/JTable/4235420/bug4235420.java 8079127 generic-all
701700
javax/swing/JSplitPane/4201995/bug4201995.java 8079127 generic-all
702701
javax/swing/JTree/DnD/LastNodeLowerHalfDrop.java 8159131 linux-all
703702
javax/swing/JTree/4633594/JTreeFocusTest.java 8173125 macosx-all

test/jdk/javax/swing/JTable/4235420/bug4235420.java

+25-11
Original file line numberDiff line numberDiff line change
@@ -37,20 +37,34 @@
3737
publicclassbug4235420 {
3838

3939
publicstaticvoidmain(String[] argv) throwsException {
40-
if ("Nimbus".equals(UIManager.getLookAndFeel().getName())) {
41-
System.out.println("The test is skipped for Nimbus");
42-
43-
return;
44-
}
40+
for (UIManager.LookAndFeelInfoLF :
41+
UIManager.getInstalledLookAndFeels()) {
42+
try {
43+
UIManager.setLookAndFeel(LF.getClassName());
44+
} catch (UnsupportedLookAndFeelExceptionignored) {
45+
System.out.println("Unsupported L&F: " + LF.getClassName());
46+
} catch (ClassNotFoundException | InstantiationException
47+
| IllegalAccessExceptione) {
48+
thrownewRuntimeException(e);
49+
}
50+
System.out.println("Testing L&F: " + LF.getClassName());
4551

46-
SwingUtilities.invokeAndWait(newRunnable() {
47-
@Override
48-
publicvoidrun() {
49-
Tabletable = newTable();
52+
if ("Nimbus".equals(UIManager.getLookAndFeel().getName()) ||
53+
"GTK".equals(UIManager.getLookAndFeel().getName())) {
54+
System.out.println("The test is skipped for Nimbus and GTK");
5055

51-
table.test();
56+
continue;
5257
}
53-
});
58+
59+
SwingUtilities.invokeAndWait(newRunnable() {
60+
@Override
61+
publicvoidrun() {
62+
Tabletable = newTable();
63+
64+
table.test();
65+
}
66+
});
67+
}
5468
}
5569

5670
privatestaticclassTableextendsJTable {

0 commit comments

Comments
 (0)
close