I am trying to implement a JDialog
at the end of a program and collect the user's input. My problem is that when the user clicks the "Cancel" button, Eclipse shows:
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException.
The program seems running OK though afterwards. I can still start a new game etc. What is the code that I need to add in order to get rid of this NullPointerException
?