0

I am creating a GUI right now. The only issue I have is that when there is a runtime error, the GUI does not stop and it won't let the user know about the error. I cannot have the GUI to stop and give an error message. Is there a syntax or a method that I can use to let the user know if the program ended successfully or there were some errors and it stopped?

thank you!

splungebob
  • 5,217
  • 2
  • 18
  • 44
  • 1
    Will a [JOptionPane Error Dialog](http://www.java2s.com/Code/Java/Swing-JFC/DisplayerrormessagedialogwithJOptionPaneERRORMESSAGE.htm) work? You can use it in the `catch` block when you get an Exception to provide the visual feedback. – Compass Sep 22 '14 at 20:30
  • `Thread.setDefaultUncaughtExceptionHandler` can be used to catch some exceptions and then tell something to the user. – mariusm Sep 22 '14 at 21:17
  • For [example](http://stackoverflow.com/a/14011536/230513). – trashgod Sep 22 '14 at 23:56

0 Answers0