Public bug reported: Description of the problem Using any fractional scaling makes the UI of Java programs very small compared to everything else on the desktop.
Steps to reproduce: 1. apt install -y default-jre 2. Go to https://docs.oracle.com/javase/tutorial/uiswing/examples/components/index.html#table 3. Download "Border Demo Project" (https://docs.oracle.com/javase/tutorial/uiswing/examples/zipfiles/components-BorderDemoProject.zip ) 4. Unpack the zip. 5. cd components-BorderDemoProject/src/components/ 6. Run java BorderDemo.java 7. Note the size of the UI that appears and close it 8. Run /usr/bin/gnome-control-center display 9. Click on a display 10. Select Fractional Scaling so the radio moves to the right. 11. Tick on Scale and change it from 100% to 125%. 12. Click Apply 13. Run java BorderDemo.java Expected results The size of the UI at step 11 to be slightly bigger than the UI at step 13? Actual result The size of the UI at step 11 is significantly smaller than the UI at step 13 How reproducible is the problem? The problem happens every time Version information Ubuntu 25.04 openjdk-21-jre:amd64 21.0.7~8ea-1 Additional information I don't remember this happening on Ubuntu 24.10 despite using fractional scaling there so this feels like a regression. I actually have two monitors (one internal HiDPI laptop screen and one standard res external monitor) and the problem occurs even if it's only the laptop display set to be fractional (even when the Java app is on the non-fractional monitor). This may also be related to https://bugs.openjdk.org/browse/JDK-8326428 (although that ticket mentions KDE). Using JAVA_TOOL_OPTIONS=-Dsun.java2d.uiScale=2 java BorderDemo.java stops the UI feeling too small compared to everything else. ProblemType: Bug DistroRelease: Ubuntu 25.04 Package: openjdk-21-jre 21.0.7~8ea-1 ProcVersionSignature: Ubuntu 6.14.0-15.15-generic 6.14.0 Uname: Linux 6.14.0-15-generic x86_64 ApportVersion: 2.32.0-0ubuntu5 Architecture: amd64 CasperMD5CheckResult: pass CurrentDesktop: ubuntu:GNOME Date: Tue Apr 29 15:56:01 2025 InstallationDate: Installed on 2025-03-24 (36 days ago) InstallationMedia: Ubuntu 24.10 "Oracular Oriole" - Release amd64 (20241009.4) SourcePackage: openjdk-21 UpgradeStatus: Upgraded to plucky on 2025-04-18 (11 days ago) ** Affects: openjdk-21 (Ubuntu) Importance: Undecided Status: New ** Tags: amd64 apport-bug plucky wayland-session -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2109623 Title: Java UI is extremely small with fractional scaling To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/openjdk-21/+bug/2109623/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
