[求助]怎么没有输出?
import javax.swing.JOptionPane;public class Pic1 {
public static void main(String args[])
{
JOptionPane.showInternalMessageDialog(null, "* * * * * * * * \n * * * * * * * *\n" +
"* * * * * * * * \n * * * * * * * *\n" +
"* * * * * * * * \n * * * * * * * *\n" +
"* * * * * * * * \n * * * * * * * *\n","result", JOptionPane.PLAIN_MESSAGE);
}
}
报了这样的错误:
Exception in thread "main" java.lang.RuntimeException: JOptionPane: parentComponent does not have a valid parent
at javax.swing.JOptionPane.createInternalFrame(Unknown Source)
at javax.swing.JOptionPane.showInternalOptionDialog(Unknown Source)
at javax.swing.JOptionPane.showInternalMessageDialog(Unknown Source)
at javax.swing.JOptionPane.showInternalMessageDialog(Unknown Source)
at Pic1.main(Pic1.java:6)
图形输不出来