I've got a question about building a gui in javafx.
When I build a program with many pages, I mean for example - The start page contains a couple of buttons "Add user", "Drop user", "Change user data" - each of these buttons draws an different panel. And here is my question - how to organise them. When I put all panels in one class it becomes quickly huge and generates many many bugs. It's also hard to find a part of code which is broken. Should every panel be defined in a different class? But if so, there is a problem with returning from submenus to main menu.
Or another example. First panel of program is login page and the next page depends on the inserted login.
How should I organize a lot of panels? Any help would be appreciated :)