Hello all,
Im writing an app for school project. It's got several .java source files. The main GUI is a Jframe with a simple menu with some submenus that do things. Question. I have an actionListener on a menu item(JMenuItem) Analyze. A JTable will popup showing all analyzed files(dont worry about all the details-- analyzed files are sound files (.wav)(train horn noise) that have been analyzed to show their amplitude values). It gets these from a database. However if there are no files analyzed yet, I want to call an ErrorHandler and inform the user to first analyze a file. My error message pops up, BUT, it continues with some functionality in this Analyze java file -- for example it pops up the JTable showing no rows--I dont want this! I want to stop all execution of this file and return to the main menu GUI. Any suggestions?
Im writing an app for school project. It's got several .java source files. The main GUI is a Jframe with a simple menu with some submenus that do things. Question. I have an actionListener on a menu item(JMenuItem) Analyze. A JTable will popup showing all analyzed files(dont worry about all the details-- analyzed files are sound files (.wav)(train horn noise) that have been analyzed to show their amplitude values). It gets these from a database. However if there are no files analyzed yet, I want to call an ErrorHandler and inform the user to first analyze a file. My error message pops up, BUT, it continues with some functionality in this Analyze java file -- for example it pops up the JTable showing no rows--I dont want this! I want to stop all execution of this file and return to the main menu GUI. Any suggestions?