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

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

    Details

    • Type: Bug
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 8u101, 8u102, 9
    • Fix Version/s: tbd
    • Component/s: client-libs
    • Environment:

      Windows 7.
      HiDPI display.
      Java 8u102/101 or Java 9_ea128

      Description

      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);
              });
          }
      }

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated: