Hello,
I have put a lot of effort into creating a nice GUI for my game in JavaFX with the Scene builder only to realise that when its on someone elses PC it glitches out of the Screen, because I made in on my Ultrawide monitor. I tried to scale it according to the Screen Size, but it just adds some more of the Background and does not scale the objects and panes within the main Borderpane with it (See in the Screenshots). Can anyone help me? I dont want to rebuilt all of it, because there are also some animations that work with absolute positions ( I didnt know how to do it different).
Thanks for any help!
#JavaFX Stage does not Scale objects inside of it
1 messages · Page 1 of 1 (latest)
<@&987246487241105418> please have a look, thanks.
I uploaded your attachments as Gist.
don't use absolute positioning
I am still learning - I dont know that and even if, it would not help with the issue
Can you tell me what I have to change?
i don't see any objects or animations in the code you posted. show the fxml
I uploaded your attachments as Gist.
I uploaded your attachments as Gist.
you arent including any scale variable to account for scaling
I am sry but I really dont understand
And lets say I find out how to scale the animations ( which I will, I will just google for hours or sth) how do I make everything else of my FXML scalable?
what are you trying to make? if you're making a game, i wouldnt recommend using fxml at all, that's more targetted for desktop apps
Its not too complicated, just a project for school.
I cant really change it rn, its almost done
you have to make changes, unless you're trying to keep what you have
if its a project for school, do you need to worry about differences on different platforms?
kind of, the problem is, im programming at home at my large monitor and my teacher has the school monitor (full hd
It would even be enough to just change what I have to Full HD that would work as well
when I am trying to pull at the corner, it just does not change
It can only be made larger for some reason
what would you recommend?
change your resolution & program against that
that way you don't have to worry about implementing scaling, especially if it's not a requirement
okay I ll try to work around - thanks - wdym with resolution and program against that?
change your screen resolution so you can program on a similar resolution to your school monitors
@lavish pilot
Your question has been closed due to inactivity.
If it was not resolved yet, feel free to just post a message below
to reopen it, or create a new thread.
Note that usually the reason for nobody calling back is that your
question may have been not well asked and hence no one felt confident
enough answering.
When you reopen the thread, try to use your time to improve the quality
of the question by elaborating, providing details, context, all relevant code
snippets, any errors you are getting, concrete examples and perhaps also some
screenshots. Share your attempt, explain the expected results and compare
them to the current results.
Also try to make the information easily accessible by sharing code
or assignment descriptions directly on Discord, not behind a link or
PDF-file; provide some guidance for long code snippets and ensure
the code is well formatted and has syntax highlighting. Kindly read through
https://stackoverflow.com/help/how-to-ask for more.
With enough info, someone knows the answer for sure 👍