JDK 11 | JDK 17 | JDK 20 |
---|---|---|
11.0.19-oracleFixed | 17.0.7-oracleFixed | 20 b02Fixed |
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
ADDITIONAL SYSTEM INFORMATION : 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
|