Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8031573

[macosx] Checkmarks of JCheckBoxMenuItems aren't rendered in high resolution on Retina

XMLWordPrintable

    • b05
    • os_x

        FULL PRODUCT VERSION :
        java version "1.8.0-ea"
        Java(TM) SE Runtime Environment (build 1.8.0-ea-b121)
        Java HotSpot(TM) 64-Bit Server VM (build 25.0-b63, mixed mode)

        ADDITIONAL OS VERSION INFORMATION :
        Darwin mankell 13.0.2 Darwin Kernel Version 13.0.2: Sun Sep 29 19:38:57 PDT 2013; root:xnu-2422.75.4~1/RELEASE_X86_64 x86_64

        EXTRA RELEVANT SYSTEM CONFIGURATION :
        Retina display

        A DESCRIPTION OF THE PROBLEM :
        Checkmarks of JCheckBoxMenuItems aren't rendered in high res on Retina displays.

        STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
        Create a JFrame with a menu and a selected JCheckBoxMenuItem.

        EXPECTED VERSUS ACTUAL BEHAVIOR :
        EXPECTED -
        The checkmark should be rendered in high resolution/HiDPI, just like the all other components.
        ACTUAL -
        The checkmark is quite "pixely", rendered in low resolution.

        REPRODUCIBILITY :
        This bug can be reproduced always.

        ---------- BEGIN SOURCE ----------
        import javax.swing.*;

        public class HiDPIJCheckBoxMenuItem {

            public static void main(String[] args) {
                final JFrame frame = new JFrame();
                final JMenuBar bar = new JMenuBar();
                final JMenu menu = new JMenu("Menu");
                final JCheckBoxMenuItem checkBoxMenuItem = new JCheckBoxMenuItem("JCheckBoxMenuItem");
                checkBoxMenuItem.setSelected(true);
                menu.add(checkBoxMenuItem);
                bar.add(menu);
                frame.setJMenuBar(bar);

                SwingUtilities.invokeLater(new Runnable() {
                    @Override
                    public void run() {
                        frame.setBounds(100, 100, 100, 100);
                        frame.setVisible(true);
                    }
                });
            }
        }

        ---------- END SOURCE ----------

              alexsch Alexandr Scherbatiy
              webbuggrp Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: