java - execute an action from a javafx menu item and keeping gui and action in separate files -
who: work county ambulance service. have forty ambulances , 2 hundred fire apparatus. what: asking write compute program in java. have gui constructed in javafx scene builder 2.0. using netbeans code application. enclosed simple code gui. question in 2 parts; question 1.) have analysis menu expected call volume menu item. have code reaches database , pulls out information , generates poisson frequency distribution. how marry 2 things together. in other words, when user clicks menu item should fire off code. how attach code menu item? question 2.) perhaps not question, keeping action code in separate .java file. reason doing keep separate gui code. think more manageable have pieces unique things. there special need tie separate java file gui? java file action event go (fxmldocumentexplorer.java or javafxapplication2.java)? when: hoping accomplished before 9 october 2015 where: javafx scene builder 2.0 , netbeans 8.02 on windows machine. jdk 8. why: have lot of databas...