0

I am making a bus ticketing system and I have designed the GUI with JavaFX.

I have used a lot of tabs for different entities designed through scene builder.

My question is: can I make different controller class for each tab having same FXML file? I'm finding that if I code for all the tabs in same controller class it is really getting messy.

Bilal Nasir
  • 205
  • 2
  • 10
  • 4
    Probably a duplicate: https://stackoverflow.com/q/38095562/1531971 (If not, you need to tell us why, by showing your [mcve].) –  Dec 20 '18 at 21:33
  • 1
    You should make each unique `Tab`'s content be its own FXML file and `fx:include` them into the `TabPane`. That way each `Tab` will have its own controller. – Slaw Dec 20 '18 at 23:49

0 Answers0