1

I want to know how do you add buttons to a panel in fxml with javafx script because my program doesn't have a static amount of buttons. Is it even posible or has someone another idea? Thank you Fire-Phoenix

1 Answers1

0

If your program doesn't have static number of buttons then you can't do it in fxml. There is a workaround of creating a Panel in javafx and creating buttons inside the intialize() of the controller and add buttons to the Panel. This will let you add any number of buttons !

ItachiUchiha
  • 36,135
  • 10
  • 122
  • 176