8258554: javax/swing/JTable/4235420/bug4235420.java fails in GTK L&F

Reviewed-by: serb
This commit is contained in:
Prasanta Sadhukhan 2020-12-19 12:00:18 +00:00
parent c50b464a12
commit c7c53d016e
2 changed files with 27 additions and 14 deletions

View file

@ -731,7 +731,6 @@ javax/swing/JWindow/ShapedAndTranslucentWindows/TranslucentJComboBox.java 802462
# The next test below is an intermittent failure
javax/swing/JComboBox/8033069/bug8033069ScrollBar.java 8163367 generic-all
javax/swing/JColorChooser/Test6827032.java 8197825 windows-all
javax/swing/JTable/4235420/bug4235420.java 8079127 generic-all
javax/swing/JSplitPane/4201995/bug4201995.java 8079127 generic-all
javax/swing/JTree/DnD/LastNodeLowerHalfDrop.java 8159131 linux-all
javax/swing/JTree/4633594/JTreeFocusTest.java 8173125 macosx-all

View file

@ -37,20 +37,34 @@ import java.util.Map;
public class bug4235420 {
public static void main(String[] argv) throws Exception {
if ("Nimbus".equals(UIManager.getLookAndFeel().getName())) {
System.out.println("The test is skipped for Nimbus");
return;
}
SwingUtilities.invokeAndWait(new Runnable() {
@Override
public void run() {
Table table = new Table();
table.test();
for (UIManager.LookAndFeelInfo LF :
UIManager.getInstalledLookAndFeels()) {
try {
UIManager.setLookAndFeel(LF.getClassName());
} catch (UnsupportedLookAndFeelException ignored) {
System.out.println("Unsupported L&F: " + LF.getClassName());
} catch (ClassNotFoundException | InstantiationException
| IllegalAccessException e) {
throw new RuntimeException(e);
}
});
System.out.println("Testing L&F: " + LF.getClassName());
if ("Nimbus".equals(UIManager.getLookAndFeel().getName()) ||
"GTK".equals(UIManager.getLookAndFeel().getName())) {
System.out.println("The test is skipped for Nimbus and GTK");
continue;
}
SwingUtilities.invokeAndWait(new Runnable() {
@Override
public void run() {
Table table = new Table();
table.test();
}
});
}
}
private static class Table extends JTable {