exception - Java Stop Script Continuation Without System.exit(1); -


i have program , catching error. need program stop , stay idle if there exception.

i have this:

// try parse integer make sure it's integer. try {     integer.parseint(celsiustxtfield.gettext()); }  // catch if it's not integer , murder user being stupid. should know temperature consists of numbers , not letters. catch(numberformatexception e) {     joptionpane.showmessagedialog(null, "you did not submit number. please try again.", "general error - error #2", joptionpane.error_message); } 

but, though shows error message, still continues on script.

this simple, i'm new java, please excuse not knowing.

i found way this.

move under try, , way, catch last thing, there's nothing else executed.


Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -