当前位置: 技术问答>java相关
这个java程序有什么问题吗?
来源: 互联网 发布时间:2015-01-15
本文导语: import javax.swing.*; public class welcome { public static void main(String[]grav) { JOptionpane.showMessageDialog( null, "Welcome to the wonderful world of Java!", ...
import javax.swing.*;
public class welcome
{
public static void main(String[]grav)
{
JOptionpane.showMessageDialog(
null,
"Welcome to the wonderful world of Java!",
"Welcome,new programmer",
JOptionpane.PLAN_MESSAGE);
System.exit(0);
}
}
有错误吗?为什么比哪一总是出错?
welcome.java:10: cannot resolve symbol
symbol : variable JOptionpane
location: class welcome
JOptionpane.PLAN_MESSAGE);
^
welcome.java:6: cannot resolve symbol
symbol : variable JOptionpane
location: class welcome
JOptionpane.showMessageDialog(
^
2 errors
这是为什么?
public class welcome
{
public static void main(String[]grav)
{
JOptionpane.showMessageDialog(
null,
"Welcome to the wonderful world of Java!",
"Welcome,new programmer",
JOptionpane.PLAN_MESSAGE);
System.exit(0);
}
}
有错误吗?为什么比哪一总是出错?
welcome.java:10: cannot resolve symbol
symbol : variable JOptionpane
location: class welcome
JOptionpane.PLAN_MESSAGE);
^
welcome.java:6: cannot resolve symbol
symbol : variable JOptionpane
location: class welcome
JOptionpane.showMessageDialog(
^
2 errors
这是为什么?
|
JOptionpane ==> JOptionPane