< prev index next >
src/java.desktop/share/classes/javax/swing/JPanel.java
Print this page
@@ -178,10 +178,21 @@
ui.installUI(this);
}
}
}
+ /**
+ * Only for Linux System, try to sync repaint method to correct for the
+ * moment bug JDK-8178091. The bug is only on Linux ,so in other os it uses
+ * asyncrone repaint()
+ */
+ public void repaint() {
+ super.repaint();
+ if (System.getProperty("os.name").equals("Linux")) {
+ Toolkit.getDefaultToolkit().sync();
+ }
+ }
/**
* Returns a string representation of this JPanel. This method
* is intended to be used only for debugging purposes, and the
* content and format of the returned string may vary between
< prev index next >