Originally Posted by
priya456
you can pass any JComponent as Object in the conctructor for JOptionPane,
in your case is there null value - JOptionPane.showMessageDialog(null, "ErrorMsg", for example
JOptionPane.showMessageDialog(myFrame,
"ErrorMsg", "Failure", JOptionPane.ERROR_MESSAGE);
This message is a straight copy from a stack overflow website here \\
https://stackoverflow.com/questions/...-in-a-jframe\\ , it doesnt even answer ops question properly.
( sorry i do not know if we are allowed to post links)