java中joptionpane错误

importjavax.swing.*;;publicclasshello{publicstaticvoidmain(String[]args){Stringstr=JO... import javax.swing.*;; public class hello{ public static void main(String [] args) { String str=JOptionPane.showInputDialog(null, "alert", "alert", JOptionPane.QUESTION_MESSAGE); }}错误:D:\document\java>javac hello.javaD:\document\java>java helloException in thread "main" java.lang.ExceptionInInitializerError at javax.swing.JOptionPane.updateUI(JOptionPane.java:1859) at javax.swing.JOptionPane.<init>(JOptionPane.java:1822) at javax.swing.JOptionPane.showInputDialog(JOptionPane.java:552) at javax.swing.JOptionPane.showInputDialog(JOptionPane.java:508) at hello.main(hello.java:5)Caused by: java.lang.IllegalArgumentException: 91 incompatible with Text-specific LCD contrast key at java.awt.RenderingHints.put(RenderingHints.java:1057) at sun.awt.windows.WDesktopProperties.getDesktopAAHints(WDesktopProperties.java:293) at sun.awt.windows.WToolkit.getDesktopAAHints(WToolkit.java:925) at sun.awt.SunToolkit.getDesktopFontHints(SunToolkit.java:1882) at sun.awt.windows.WDesktopProperties.getProperties(WDesktopProperties.java:230) at sun.awt.windows.WToolkit.updateProperties(WToolkit.java:880) at sun.awt.windows.WToolkit.lazilyInitWProps(WToolkit.java:832) at sun.awt.windows.WToolkit.lazilyLoadDesktopProperty(WToolkit.java:821) at java.awt.Toolkit.getDesktopProperty(Toolkit.java:1746) at javax.swing.UIManager.<clinit>(UIManager.java:388) ... 5 more讲的详细一些,今天新学的java; 展开
 我来答
qiailu1314
2011-12-05 · TA获得超过523个赞
知道小有建树答主
回答量:642
采纳率:0%
帮助的人:319万
展开全部
import javax.swing.*;; public class hello{ public static void main(String [] args) { String str=JOptionPane.showInputDialog(null, "alert", "alert", JOptionPane.QUESTION_MESSAGE); }}
中的这里“import javax.swing.*;;” 多个分号 你去掉试试
huayife3g
2011-12-03 · TA获得超过228个赞
知道小有建树答主
回答量:395
采纳率:0%
帮助的人:305万
展开全部
程序本身没错误,估计你编译错了
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式