I'm trying to understand how to support different resolutions in JavaFX. I'm looking for a sort of a guide about how to achieve this.
I want to create an application which requires a minimum resolution of, for example, 1280×720. And I want that my applications looks fine on any higher resolution too (like 1920×1080). Also, the application should look good at different DPI values. How can I do that?
Lets set as minimum requirements JDK 11.0.2+ and JavaFX 11.0.2+ to be more specific.
What I (seem to) understand now:
What I still don't understand:
I hope I was clear enough.
I'm new to creating interfaces for real, not toy applications. And I will appreciate any help, be it comments, explanations, code samples or links to articles.
Thank you in advance for your help.
Well that a very good question as JavaFX
doesn't support responsive resolution on the fly so you gonna do it by yourself
BorderPane
that have 5 sections to set your components at effortlessly FXML
file for each supported resolution by your app so you can run the appropriate design and also for landscape and portrait casesBootstrapFX
which is similar to that for web design and also there is ResponsiveFX
too but I didn't try them beforeI hope my answer help you or put you on the right track to make some cool apps
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With