JOptionPane.showMessageDialog(this, "short message", "Title has to be very longer than text, so long that title is cropped.", JOptionPane.ERROR_MESSAGE);
use null instead of this if u are testing directly in main method.
As written in the above code , if joptionpane title is larger than message it gets cropped ? is there a way to set its size ?
I could not post its screenshot . Run the single line of code in your main function