JDK-8276070 : The check icon from JCheckBoxes is not painted well on 125 scale factor
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 11,17,18
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 2021-10-22
  • Updated: 2022-09-21
  • Resolved: 2022-09-21
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbdResolved
Related Reports
Duplicate :  
Duplicate :  
Relates :  
Description
ADDITIONAL SYSTEM INFORMATION :
Windows 10; OpenJDK-11.0.2; 125 scaling factor

A DESCRIPTION OF THE PROBLEM :
I have a 2k monitor with a 125 scale factor on Windows 10. The check icon from a JCheckBox component is not painted well.
I filled in the "Source code" field with a sample.


---------- BEGIN SOURCE ----------
package com.oxygenxml.sampleMavenProject;

import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;

import javax.swing.JCheckBox;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;

public class CheckBoxExample {
	CheckBoxExample() {
		JFrame f = new JFrame("CheckBox Example");
		JCheckBox checkBox1 = new JCheckBox("A");
		JCheckBox checkBox2 = new JCheckBox("B", true);
		JCheckBox checkBox3 = new JCheckBox("C", true);
		JCheckBox checkBox4 = new JCheckBox("D", true);

		JPanel panel = new JPanel();
		panel.setLayout(new GridBagLayout());
		f.add(panel);

		GridBagConstraints gbc = new GridBagConstraints();
		gbc.gridx = 0;
		gbc.gridy = 0;
		panel.add(checkBox1, gbc);

		gbc.gridy++;
		panel.add(checkBox2, gbc);

		gbc.gridy++;
		panel.add(checkBox3, gbc);

		gbc.gridy++;
		panel.add(checkBox4, gbc);

		f.setSize(400, 400);
		f.pack();
		f.setLayout(null);
		f.setVisible(true);
	}

	public static void main(String args[]) {
		try {
			UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
		} catch (Exception e) {
			e.printStackTrace();
		}
		new CheckBoxExample();
	}
}
---------- END SOURCE ----------


Comments
Checked with attached test case in Windows 10, issue is reproducible when display scaled to 125% with display resolution 1980X1080, <attached screenshot for reference) Test Result ========= 8u311: Pass 11: Fail 11.0.13: Fail 17.0.1: Fail 18ea20: Fail
27-10-2021