1

最近のライブラリを実質的にダウンロードし、SwingXコンポーネントをサポートするためのアドオンもダウンロードしました。アプリケーションを実行すると、まだ次のエラーが発生します

UIDefaults.getUI() failed: no ComponentUI class for:   org.jdesktop.swingx.JXTaskPaneContainer[,0,0,0x0,invalid,alignmentX=0.0,alignmentY=0.0,bord  er=,flags=9,maximumSize=,minimumSize=,preferredSize=]  
java.lang.Error  
        at javax.swing.UIDefaults.getUIError(UIDefaults.java:711)  
        at javax.swing.MultiUIDefaults.getUIError(MultiUIDefaults.java:133)  
        at javax.swing.UIDefaults.getUI(UIDefaults.java:741)  
        at javax.swing.UIManager.getUI(UIManager.java:1017)  
        at org.jdesktop.swingx.plaf.LookAndFeelAddons.getUI(LookAndFeelAddons.java:308)  
        at org.jdesktop.swingx.JXTaskPaneContainer.updateUI(JXTaskPaneContainer.java:141)  
        at javax.swing.JPanel.<init>(JPanel.java:69)  
        at javax.swing.JPanel.<init>(JPanel.java:78)  
        at org.jdesktop.swingx.JXPanel.<init>(JXPanel.java:133)  
        at org.jdesktop.swingx.JXTaskPaneContainer.<init>(JXTaskPaneContainer.java:113)  
        at operator.table_browser.initComponents(table_browser.java:48)  
        at operator.table_browser.<init>(table_browser.java:33)  
        at forms_helper.form_objects.<clinit>(form_objects.java:71)  
        at Main$1.run(Main.java:53)  
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)  
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)  
        at   java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)  
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)  
        at   java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)  
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)  
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)  
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)  
Exception in thread "AWT-EventQueue-0" java.lang.ExceptionInInitializerError  
        at Main$1.run(Main.java:53)  
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)  
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)  
        at   java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)  
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)  
        at   java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)  
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)  
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)  
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)  
Caused by: java.lang.NullPointerException  
        at org.jdesktop.swingx.plaf.LookAndFeelAddons.getUI(LookAndFeelAddons.java:313)  
        at org.jdesktop.swingx.JXTaskPaneContainer.updateUI(JXTaskPaneContainer.java:141)  
        at javax.swing.JPanel.<init>(JPanel.java:69)  
        at javax.swing.JPanel.<init>(JPanel.java:78)  
        at org.jdesktop.swingx.JXPanel.<init>(JXPanel.java:133)  
        at org.jdesktop.swingx.JXTaskPaneContainer.<init>(JXTaskPaneContainer.java:113)  
        at operator.table_browser.initComponents(table_browser.java:48)  
        at operator.table_browser.<init>(table_browser.java:33)  
        at forms_helper.form_objects.<clinit>(form_objects.java:71)  
        ... 9 more

この問題を解決するのを手伝ってください!

4

2 に答える 2

3

1.最初の質問はEDTにSubstanceL&Fを正しく追加しましたか

fe

SwingUtilities.invokeLater(new Runnable() {

        @Override
        public void run() {
            try {
                UIManager.setLookAndFeel(new SubstanceOfficeSilver2007LookAndFeel());
                SwingUtilities.updateComponentTreeUI(frame);
            } catch (UnsupportedLookAndFeelException e) {
                throw new RuntimeException(e);
            }
        }
    });
于 2011-04-24T13:38:48.660 に答える
0

皆さんありがとう!!

NetBeansキャッシュファイルをリセットするだけでこの問題は解決しました:)NetBeansは時々奇妙です...完全に無関係な問題を経験する必要がありました..:)

于 2011-04-27T17:25:03.987 に答える