JavaFX GUI independent of screen?

St
1

Hallihallo, I have a question to the graphics programmers out there…

I recently programmed a GUI with Swing and tested it on my screen (1920x1080). So far so good. On an Apple laptop hats worked just as well. But now I've run it on a 4k laptop and then I just saw a tiny, squeezed window. That was not nice anymore.

My question is: How can I create a GUI with JavaFX (or Scenebuilder), which can be viewed in all (at least common) resolutions? (I'm hoping for better from JavaFX.)

br

Yes, that's very comfortable with JavaFX.

However, that also works with Swing! So I built around the 2000-turn a small library, mainly consisting of its own layout manager and some auxiliary classes, which made a swing application on 640x480 look exactly like the then usual maximum 1600x1200.

About 10 years ago I wrote something similar for Lazarus applications with FreePascal and a while ago for interfaces with the old old Win32 API, so that they are still usable at 4K.

All in all an afternoon task and actually in every language with every GUI framework possible! Basically, all you have to do is iterate through the widgets, save their position and size, and zoom in on the elements when zooming in and adjust font sizes.

Implementation details are of course dependent on the APIs used, but all in all, the EXCEPTIONAL has always worked very well… I wonder why that does not make much more applications, because on a 4K display 16x16 icons in the toolbar are not really useful.

Conclusion: You can write your own! This is not very time-consuming and - if you are already advanced - done in an afternoon.