I have a question in regards to pressing the cancel button of my inputDialoguebox. I have asked a similar question before so I apologize if I seem to repeat myself.
<
When you click on the Cancel Button
of the showInputDialog(...)
, you always get a null value, for which no condition is satisfied, hence a new connection is always established.
So you can add this condition like this :
if(input == null || (input != null && ("".equals(input))))
{
throw new EmptyFieldsException();
}