-
Bug
-
Resolution: Duplicate
-
P3
-
None
-
11, 17, 20, 21
-
x86_64
-
windows_10
ADDITIONAL SYSTEM INFORMATION :
Windows 10
First Monitor: 125%
Second Monitor: 100%
since 11.0.14, affected versions: 17, 20. (11.0.13 was OK)
A DESCRIPTION OF THE PROBLEM :
After moving a window from the first to the second monitor and back content is broken. Mouse click selected wrong row in a table.
Key factor is setting sun.java2d.uiScale.enabled to false, and different scale setting for the first and the second monitors.
REGRESSION : Last worked in version 11
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Run attached code. A window appears on first monitor. A table inside the window is displayed properly.
2. Move the window to the second monitor. The table still looks good.
3. Move the window back to first monitor - the content is broken.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Properly displayed window.
ACTUAL -
Broken content of window. There are double scrollbars, a black area to the left and bottom of the table.
---------- BEGIN SOURCE ----------
public class TableExample {
public static void main(String[] args) {
javax.swing.SwingUtilities.invokeLater(new Runnable() {
public void run() {
System.setProperty("sun.java2d.uiScale.enabled", "false");
JFrame frame = new JFrame("Table Example");
JTable table = new JTable( new AbstractTableModel() {
public Object getValueAt(int r, int c) { return "" + r + " : " + c; }
public int getRowCount() { return 100; }
public int getColumnCount() { return 5; }
});
JScrollPane scrollPane = new JScrollPane(table);
frame.add(scrollPane, BorderLayout.CENTER);
frame.setSize(400, 400);
frame.setVisible(true);
}
});
}
}
---------- END SOURCE ----------
FREQUENCY : always
Windows 10
First Monitor: 125%
Second Monitor: 100%
since 11.0.14, affected versions: 17, 20. (11.0.13 was OK)
A DESCRIPTION OF THE PROBLEM :
After moving a window from the first to the second monitor and back content is broken. Mouse click selected wrong row in a table.
Key factor is setting sun.java2d.uiScale.enabled to false, and different scale setting for the first and the second monitors.
REGRESSION : Last worked in version 11
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Run attached code. A window appears on first monitor. A table inside the window is displayed properly.
2. Move the window to the second monitor. The table still looks good.
3. Move the window back to first monitor - the content is broken.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Properly displayed window.
ACTUAL -
Broken content of window. There are double scrollbars, a black area to the left and bottom of the table.
---------- BEGIN SOURCE ----------
public class TableExample {
public static void main(String[] args) {
javax.swing.SwingUtilities.invokeLater(new Runnable() {
public void run() {
System.setProperty("sun.java2d.uiScale.enabled", "false");
JFrame frame = new JFrame("Table Example");
JTable table = new JTable( new AbstractTableModel() {
public Object getValueAt(int r, int c) { return "" + r + " : " + c; }
public int getRowCount() { return 100; }
public int getColumnCount() { return 5; }
});
JScrollPane scrollPane = new JScrollPane(table);
frame.add(scrollPane, BorderLayout.CENTER);
frame.setSize(400, 400);
frame.setVisible(true);
}
});
}
}
---------- END SOURCE ----------
FREQUENCY : always
- duplicates
-
JDK-8296633 Window UI unpainted when moving from monitor with 100% scale to monitor with 125% scale
- Closed