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 ----------