-
Bug
-
Resolution: Fixed
-
P3
-
11, 17, 18, 19
-
b02
-
x86_64
-
windows
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8296563 | 17.0.7-oracle | Rajat Mahajan | P3 | Resolved | Fixed | b01 |
JDK-8302584 | 17.0.7 | Goetz Lindenmaier | P3 | Resolved | Fixed | b03 |
JDK-8296564 | 11.0.19-oracle | Rajat Mahajan | P3 | Resolved | Fixed | b01 |
JDK-8302579 | 11.0.19 | Goetz Lindenmaier | P3 | Resolved | Fixed | b03 |
Windows, jdk-19 and jdk-17
A DESCRIPTION OF THE PROBLEM :
When I run the code attached into the "Source code for an executable test case" section, the line from the left side of the TitledBorder is not painted correctly. This is painted in white instead of black/grey.
I reproduced the problem on Windows with a HiDPI monitor and a scaling factor set to 150.
The border is painted well when the scaling factor is set to 100 or 125.
REGRESSION : Last worked in version 8u301
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Prerequisite: an HiDPI monitor
Execute the attached code on Windows 10 with a scaling factor set to 150.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The line from the left side of the title border will be painted as the one from the right side.
ACTUAL -
The line from the left side is painted in white.
---------- BEGIN SOURCE ----------
package ro.sync.ui.application;
import java.awt.BorderLayout;
import javax.swing.BorderFactory;
import javax.swing.JCheckBox;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.UIManager;
import ro.sync.ui.LFSystemUtil;
public class SwingDemo2 {
public static void main(String[] args) throws Exception {
UIManager.setLookAndFeel(LFSystemUtil.getSystemLookAndFeelClassName());
JFrame frame = new JFrame("Swing Test");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
JPanel parentPanel = new JPanel(new BorderLayout());
parentPanel.setBorder(ApplicationBorderFactory.createEmptyBorder(5, 5, 5, 5));
JPanel childPanel = new JPanel(new BorderLayout());
childPanel.setBorder(BorderFactory.createTitledBorder("Title"));
childPanel.add(new JCheckBox(), BorderLayout.CENTER);
parentPanel.add(childPanel, BorderLayout.CENTER);
frame.getContentPane().add(parentPanel, BorderLayout.CENTER);
frame.pack();
frame.setLocationRelativeTo(null);
frame.setVisible(true);
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
I don't have a workaround
FREQUENCY : always
- backported by
-
JDK-8296563 The left line of the TitledBorder is not painted on 150 scale factor
-
- Resolved
-
-
JDK-8296564 The left line of the TitledBorder is not painted on 150 scale factor
-
- Resolved
-
-
JDK-8302579 The left line of the TitledBorder is not painted on 150 scale factor
-
- Resolved
-
-
JDK-8302584 The left line of the TitledBorder is not painted on 150 scale factor
-
- Resolved
-
- relates to
-
JDK-8294680 Refactor scaled border rendering
-
- Resolved
-
-
JDK-8294921 Background color visible at edges of EtchedBorder
-
- Closed
-
-
JDK-8282958 Rendering Issues with Borders on Windows High-DPI systems
-
- Resolved
-
-
JDK-8288332 Tier1 validate-source fails after 8279614
-
- Closed
-
-
JDK-8059328 LineBorder paints left edge 1 extra pixel wider since JDK 8
-
- Closed
-
- links to
-
Commit openjdk/jdk11u-dev/6678084b
-
Commit openjdk/jdk17u-dev/efe86767
-
Commit openjdk/jdk/b42c1ad1
-
Review openjdk/jdk11u-dev/1732
-
Review openjdk/jdk17u-dev/1171
-
Review openjdk/jdk/7449