SeaGlass LaF erorr

时间:2016-06-05 17:02:34

标签: java swing look-and-feel

我在java中有学校项目,所以我想要一些自定义LaF并选择seaglass。

这是我的测试代码。

public static void main(String[] args)
    {
        try
        {
            UIManager.setLookAndFeel("com.seaglasslookandfeel.SeaGlassLookAndFeel");
        }
        catch (Exception e)
        {
            e.printStackTrace();
        }


        int answer1 = JOptionPane.showConfirmDialog(null, "Are you sure?", "Question",
                JOptionPane.YES_NO_CANCEL_OPTION);

    }

我确实导入并构建了lib文件夹的路径, 它给我带来了很多错误。

Exception in thread "main" java.lang.NoClassDefFoundError: sun/swing/plaf/synth/SynthUI
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(Unknown Source)
    at java.security.SecureClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.access$100(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Unknown Source)
    at javax.swing.SwingUtilities.loadSystemClass(Unknown Source)
    at javax.swing.UIDefaults.getUIClass(Unknown Source)
    at javax.swing.UIDefaults.getUI(Unknown Source)
    at javax.swing.UIManager.getUI(Unknown Source)
    at javax.swing.JPanel.updateUI(Unknown Source)
    at javax.swing.JPanel.<init>(Unknown Source)
    at javax.swing.JPanel.<init>(Unknown Source)
    at javax.swing.JPanel.<init>(Unknown Source)
    at javax.swing.plaf.synth.SynthOptionPaneUI.createMessageArea(Unknown Source)
    at javax.swing.plaf.synth.SynthOptionPaneUI.installComponents(Unknown Source)
    at javax.swing.plaf.basic.BasicOptionPaneUI.installUI(Unknown Source)
    at javax.swing.JComponent.setUI(Unknown Source)
    at javax.swing.JOptionPane.setUI(Unknown Source)
    at javax.swing.JOptionPane.updateUI(Unknown Source)
    at javax.swing.JOptionPane.<init>(Unknown Source)
    at javax.swing.JOptionPane.showOptionDialog(Unknown Source)
    at javax.swing.JOptionPane.showConfirmDialog(Unknown Source)
    at javax.swing.JOptionPane.showConfirmDialog(Unknown Source)
    at javax.swing.JOptionPane.showConfirmDialog(Unknown Source)
    at videoteka.VideotekaMain.main(VideotekaMain.java:32)
Caused by: java.lang.ClassNotFoundException: sun.swing.plaf.synth.SynthUI
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    ... 34 more

我是否想念一些东西以及如何解决它?

0 个答案:

没有答案