物质外观和感觉有问题

发布于 2024-11-03 06:10:19 字数 3560 浏览 0 评论 0原文

我已经按实质下载了最新的库,并且还下载了用于支持 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

帮助我解决这个问题!

I have downloaded the recent library by substance and i have downloaded the addons also for supporting SwingX components. I am still getting the following error when i run my application

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

Help me to solve this problem!!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

美男兮 2024-11-10 06:10:19

1. 第一个问题,您是否在 EDT 上正确添加了 L&F 物质

SwingUtilities.invokeLater(new Runnable() {

        @Override
        public void run() {
            try {
                UIManager.setLookAndFeel(new SubstanceOfficeSilver2007LookAndFeel());
                SwingUtilities.updateComponentTreeUI(frame);
            } catch (UnsupportedLookAndFeelException e) {
                throw new RuntimeException(e);
            }
        }
    });

1.st question are you added Substance L&F correctly on EDT

f.e.

SwingUtilities.invokeLater(new Runnable() {

        @Override
        public void run() {
            try {
                UIManager.setLookAndFeel(new SubstanceOfficeSilver2007LookAndFeel());
                SwingUtilities.updateComponentTreeUI(frame);
            } catch (UnsupportedLookAndFeelException e) {
                throw new RuntimeException(e);
            }
        }
    });
最美不过初阳 2024-11-10 06:10:19

谢谢大家!!

我通过重置 NetBeans 缓存文件解决了这个问题:) NetBeans 有时很奇怪...必须经历一些完全不相关的问题..:)

Thanks all!!

I got that problem solved by just resetting the NetBeans cache files :) NetBeans is weird sometimes... had to go through some issue which is completely irrelevant.. :)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文