r/JavaFX • u/Xodii_Alpha • Dec 24 '24
Help Labels in Dialogue
Hi! Sorry if this is a very beginner/stupid question.
So I'm using labels in my CYOA Text game, with buttons (dialogue options) showing their own respective labels and whatnot. With that, I'm making labels, add content and styling them, making buttons, then put them all in a vbox, in a pane layout, then just changing the root scene into the pane corresponding to the certain button clicked, if that makes sense.
You can perhaps immediately see that this requires me to create a crap ton of labels and buttons, needing to instantiate each one of them. It looks messy and I think there's an easier way for this.
What should I do? Again, apologies if it's supposed to be a simple issue. I'm new to both Java and JavaFX.
View all comments
Show parent comment
1
u/Xodii_Alpha Dec 25 '24
Thank you very much for your assistance! It seems like I'd have to learn all of what you just explained, so I guess I'd check them out!