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

AWT FileDialog's ComboBox is rendered incorrectly under HiDPI Windows 7

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 8u101, 8u102, 9
    • client-libs
    • Windows 7.
      HiDPI display.
      Java 8u102/101 or Java 9_ea128

      The AWT FileDialog's ComboBox is rendered incorrectly under Windows 7 in HiDPI mode. This seems to work correctly, under Windows 8 and 10.

      As the dialog is "native", could this be a bug in Windows 7? If so, it's probably beyond repair and http://mail.openjdk.java.net/pipermail/awt-dev/2016-March/010778.html (re-implementation as "Common Item Dialog") should perhaps be considered seriously, at least for Java 9.

      To reproduce, run the following code on Windows 7 with a HiDPI display and open the ComboBox/DropDownList at the center/top of the dialog. You'd expect a properly rendered list, but the lines overlap (see attached screenshot).

      import javax.swing.*;
      import java.awt.*;

      public class FileDialogBug {

          public static void main(final String[] args) throws AWTException {
              SwingUtilities.invokeLater(() -> {
                  final JFrame frame = new JFrame();
                  frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
                  frame.setVisible(true);
                  final FileDialog fileDialog = new FileDialog(frame);
                  fileDialog.setVisible(true);
              });
          }
      }

        1. filedialog_combobox.png
          211 kB
          Hendrik Schreiber
        2. screenshot-1.png
          1.09 MB
          Prem Balakrishnan

            Unassigned Unassigned
            hschreiber Hendrik Schreiber
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: