JDK-8194165 : Swing rendering is blurred & ugly if user changes increases Windows elements size
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 9,10,11,14,15,16
  • Priority: P3
  • Status: Closed
  • Resolution: Incomplete
  • OS: other
  • CPU: x86
  • Submitted: 2017-12-22
  • Updated: 2020-11-30
  • Resolved: 2020-08-07
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbdResolved
Related Reports
Relates :  
Description
FULL PRODUCT VERSION :
java version "9.0.1"
Java(TM) SE Runtime Environment (build 9.0.1+11)
Java HotSpot(TM) 64-Bit Server VM (build 9.0.1+11, mixed mode)

ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows [version 6.3.9600]

EXTRA RELEVANT SYSTEM CONFIGURATION :
Intel HD Graphics 4600
1290 * 1080  screen resolution.

A DESCRIPTION OF THE PROBLEM :
All Swing Windows of all applications (NetBeans, etc.) appear blurred & very "ugly" if user
increases Windows Screen Resolution Options.

(Configuration Panel==> All Configuration  Panels ==> Display ==>  Change the size of all items)

There a 3 options :
- Small (100%)
- Medium 125 % (default)
- Big 150%

If user selects Medium or Big radio button, all Swing Windows appear blurred & very "ugly" .



REGRESSION.  Last worked in version 8u162

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Configuration Panel==> All Configuration Panels ==> Display ==>  Change the size of all items

There a 3 options :

- Small (100%)
- Medium 125 % (default)
- Big 150%

Choose Medium or Big..

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
To have nice & clean Swing rendeding as with Java 8 and prior version.
ACTUAL -
Ugly and blurred Swing windows.

REPRODUCIBILITY :
This bug can be reproduced always.

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

public class Test {

    public static void main(String args[]) {
        JOptionPane.showMessageDialog(null, "Swing apps are blurred & ugly if user "
                + "changes Windows elements size to 125% or more.");
    }
}
---------- END SOURCE ----------

CUSTOMER SUBMITTED WORKAROUND :
No workaround.

I have to set back elements size to 100%


Comments
<<There's some crud underneath the OK button in the 175% Metal L&F image. Sorry, I could not find what exactly what you are pointing out here. Is it that dots in the button look bigger in right and botton side and smaller in left and upper edge of button. The dots look same size in other HiDPI scale. Other than this, I could not see anything particularly wrong in button appearance. <<if you see anything else, similarly file a new focused bug. ok, I will see. As of now, other than image scaling issues, I could not find anything wrong.
11-08-2020

There's some crud underneath the OK button in the 175% Metal L&F image. All of the rest look OK to me. The image scaling is what it is .. Not enough going on here to justify a bug with this generic synopsis being still open. I suggest seeing if that button artifact reproduces in other cases and filing a new bug that focuses in on just that and closing this as not reproducible. if you see anything else, similarly file a new focused bug.
11-08-2020

[~prr] I have attached the images for various L&F for 100, 150 and 175 HiDPI scale.
11-08-2020

I tried to reproduce this with jdk16b03 in Windows 10. As far as I understand, there is no issue in text being displayed, but I do see some issues in scaling the Icon in JOptionPane. But the behaviors is not same among all LookAndFeels. I have updated and attached the test to run on all installed Look And Feels. On NimbusLookAndFeel: There is no issue on any HiDPI settings On MetalLookAndFeel and MotifLookAndFeel: Icon looks good on 100% scale and pixelated on 125, 150 and 175. On WindowsLookAndFeel: Icon looks good on 150% HiDPI scale and pixelated on 100, 125 and 175. The 150% is default recommended HiDPI setting on Windows 10. This is possible that the icons in Windows have been scaled by default to look good at 150%. but I think Java should be able to scale them properly for all scales.
07-08-2020

Can you attach images of some of these worse cases on JDK 16 ? I am not sure that we really can scale images "better", but in some cases we should (or could) have images that are designed for that scale. If there are images we are picking up from Windows (ie for Win L&F only) maybe there are multiple sizes available and we aren't trying there ? But I am not sure this bug was ever really about image scaling. There were other artifacts in those JDK 10 images. And any time you see text badly rendered you should know INSTANTLY, that it is a separate issue ..
07-08-2020

This is reproducible in JDK9_181 and JDK 10 latest code base.
03-01-2018

Reported with: JDK 9.0.1 Microsoft Windows 8.1 Intel HD Graphics 4600 1290 * 1080 screen resolution DPI - 100% and 125% According to description, all Swing Windows of all applications (NetBeans, etc.) appear blurred & very "ugly" if user increases Windows Screen Resolution Options. Checked with: JDK 8u152, 9.0.1, 10 Microsoft Windows 10 Intel(R) HD Graphics 520 1920x1080 DPI - 100% and 125% Results: ========= 8u152: OK 8u162 ea b03: OK 9: FAIl 9.0.1: FAIL 10 ea b37: FAIL This appears a known issue, however not resolved completely (See attached screenshot as reference). Seems related to JDK-8187367 To verify , run the attached test case with respective JDK versions and display configurations with DPI set to 100% and then 125%. The image and icon start blurring when the DPI is set to 125% and above.
26-12-2017

This bug report has nothing to do with JavaFX; changing the component to client-libs
23-12-2017