I have a problem with the display of JOptionPane. There is a button on my JFrame which on clicking will show a JDialog window. After entering the values i close the jdialog window.According to the values entered in the dialog window i am doing some validation and showing the JOptionpane.But the JOptionpane is not fully displayed.