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;
展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询