Hello
I am a beginner in java, so I guess my question might sound trivial to some.
I am writing some code to execute the setup of some computations. The computation needs the definition of 'continuum'.
First, I am collecting the continuum. If there are no continuum define, I am asking the name to the the user.
Everything is working fine, except that if I choose the "cancel" button, I am getting a null pointer exception while exiting.
So my question is: how to properly cancel and exit?
Thanks for any help
Integer contMgr = simulation_0.getContinuumManager().getChildrenCount(); if (contMgr == 0) { continuum= JOptionPane.showInputDialog("Enter the name of the Continuum", "" ); //-----------------------------------------------------// // If the user use the 'Cancel' option, exit of the Macro // //----------------------------------------------------// if (continuum == null) { JOptionPane.showMessageDialog(null, "Canceling the Computation Setup", "Canceling",JOptionPane.WARNING_MESSAGE); return; } } else blalbalbala