java - JOptionPane#showMessageDialog causes an application freeze -
i need show information message user , use following code purpose:
joptionpane.showmessagedialog(null, "message", "result", joptionpane.information_message);
but program loops or don't know on string of code. no matter insead of "message" still got app frozen. didn't done string of code changed ide eclipse , imports might have changed. checked , see import in class joption: import javax.swing.joptionpane;
.
what may wrong or how check wrong?
try changing
joptionpane.showmessagedialog(null, "message", "result", joptionpane.information_message);
to
joptionpane.showmessagedialog(this, "message", "result", joptionpane.information_message);
Comments
Post a Comment