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.java
D:\document\java>java hello
Exception 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-specif
ic LCD contrast key
at java.awt.RenderingHints.put(RenderingHints.java:1057)
at sun.awt.windows.WDesktopProperties.getDesktopAAHints(WDesktopPropert
ies.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;