I have a dialogue in which i am entering values. After submit I am checking for duplicate values in database and if exist I am again creating the same dialogue. As it can happen many times. I want to continue with that code. So I have used while loop and I am checking the flag value which I get after calling action_insertok()
See the code
What should i do to avoid this. Is there any alternate way.
Regards, Vijay Jamadade.
( Nothing is Impossible.)
Since we dont know what DialogFactory looks like, we cannot possibly deduce can we?
You can try comparing the JOptionPane#showXXXDialog method and your DialogFactory#showDialog method to see what different way the dialog is being created and displayed. Also check if the code tweaks the paint or paintComponent methods anywhere.