You are not logged in.
Pages: 1
Sorry if this is off topic ... but you guys are all so smart
I've got a java application not really written for this platform. However, the magical incantation "java -jar theapplication.jar" brings up the window and lets it run, etc. Wonderful.
However, the window, is so damned small I can hardly read anything! And the resize corners are disabled. So, how to I increase the size?
The only thing I can think of is creating a separate login using a smaller screen size ... but that seems a silly thing to be doing in 2020
Offline
Are you using a HiDPI screen?
There are some options for scaling java windows here.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
I'm not sure if my screen is or isn't HiDPI. It's 1920x1080.
Interesting link. Thanks ... I'm only able to use integer sizes like 2 or 200% and that makes the window just a little bit too big.
Offline
No, that's not a Hi DPI screen - just a regular one.
Which parameters did you try? If the app an AWT/Swing or JavaFX app? If it's a swing app, do these settings help?
Also, what version of Java are you running?
java -version
Last edited by ToZ (2020-04-11 02:04:29)
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
More questions ... how do I tell if it is AWT/Swing or JavaFX?
My java (from the distro) is
bob$ java --version
openjdk 11.0.6 2020-01-14
OpenJDK Runtime Environment (build 11.0.6+10-post-Ubuntu-1ubuntu119.10.1)
OpenJDK 64-Bit Server VM (build 11.0.6+10-post-Ubuntu-1ubuntu119.10.1, mixed mode, sharing)
So, I guess it's openjdk. Not sure if I can get a better version or not?
I did try both:
java -Dsun.java2d.uiScale=2 -jar some_swing_application.jar
java -Dsun.java2d.uiScale=300% -jar some_swing_application.jar
and both work to double the size ... and that gives spillage off the bottom of the screen. And using factors like 1.5 or 150% just round out to 2. Just like it says
The javaFX options have no effect.
Thanks.
Offline
More questions ... how do I tell if it is AWT/Swing or JavaFX?
Based on the commands that worked for you, its a swing app.
So, I guess it's openjdk. Not sure if I can get a better version or not?
Version is fine - UI scaling only got added at around version 9.
I did try both:
java -Dsun.java2d.uiScale=2 -jar some_swing_application.jar
java -Dsun.java2d.uiScale=300% -jar some_swing_application.jarand both work to double the size ... and that gives spillage off the bottom of the screen. And using factors like 1.5 or 150% just round out to 2. Just like it says
The javaFX options have no effect.
Thanks.
Does the following work any better?
java -Dsun.java2d.win.uiScaleX=125% -Dsun.java2d.win.uiScaleY=125% -jar some_swing_application.jar
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
Does the following work any better?
java -Dsun.java2d.win.uiScaleX=125% -Dsun.java2d.win.uiScaleY=125% -jar some_swing_application.jar
Unfortunately, no. Has no effect at all. Does run, but the same as without the commands.
Offline
That is the extent of my knowledge on getting java apps to scale. It looks like the app itself is unable to scale to a more fine tuned value.
I did come across this script which uses xpra to run an app in scaled mode. Unfortunately, the xpra package was dropped from the ubuntu repositories after 19.04. So you might have some difficulty finding it.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
Thanks for the help. Guess I'm stuck with moving the window up/down with ALT-Left-Mouse.
I did think I'd be real clever and adjust the DPI setting for Fonts, but that just effects fonts sizes. Oh well, interesting game trying to get this stuff to work!
Best,
Offline
Pages: 1
[ Generated in 0.026 seconds, 8 queries executed - Memory usage: 552.17 KiB (Peak: 569.45 KiB) ]