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

HiDPI: should AWT components be harmonized with Swing (taking into account scale factor somehow)?

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • P3
    • Resolution: Duplicate
    • 9
    • None
    • client-libs
    • None

    Description

      Sorry, that's may be not an issue, but just in case: should the AWT components be somehow (dynamically) scaled when using HiDPI?

      Please compile/run the following simple test app. attached:
      jdk/bin/java -Dswing.defaultlaf=com.sun.java.swing.plaf.gtGTKLookAndFeel -Dsun.java2d.uiScale=2 Mix

      It seems (Ubuntu 15.04 + GNOME + HiDPI display) that "sun.java2d.uiScale" is used for both AWT and Swing components.

      Please try to change scaling-factor, e.g.:
      > gsettings set org.gnome.desktop.interface scaling-factor 3

      the central (Swing) button's font is obviously changing, whereas for other (AWT) buttons - is not.

      Such a behavior may cause some discordance for application containing both AWT + Swing components (mixing)

      Another question, just in case. It seems that for Swing component we use scaling-factor multiplied by uiScale - is that what intended?

      Checked with: JDK9 b93 and recent (Oct. 17) client build.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              avstepan Alexander Stepanov
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: