I built an application that works fine and had to do a ton of workarounds to get through the "not on FX thread" stuff, but overall I think I handled it nice. Anyways, I'm now looking to make this v2.0 app of the first one I did, much better with what I've learned so far.
One of the things that still baffle me is just STARTING the project, using netBeans when I start my FXML project I am presented with 3 documents:
FXMLDocument.fxml
FXMLDocumentController.java
(app name).java
Now, I understand the first two, they're linked together and basically the controller just makes all the GUI elements created in the FXML document work, however I can't seem to link the third file, the (appname).java file, it contains the start and main methods which are always called and it loads the FXML file from there, however my first app did not have a single line in this file (other than the ones it comes with already when starting a new project), I think this is probably not a good practice.
My question is, having these 3 files, how can I connect the FXMLController with the (appname).java file? for example if I press a button how can I make it do something thats coded in the (appname).java file instead of the FXMLController file? is this even possible?