gpt4 book ai didi

java - 物质外观的问题

转载 作者:行者123 更新时间:2023-11-29 06:14:01 25 4
gpt4 key购买 nike

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

帮我解决这个问题!!

最佳答案

第一个问题是你在 EDT 上正确添加了 Substance 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);
}
}
});

关于java - 物质外观的问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5770596/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com