Substance 6.1 升级提供了当 Substance 不是当前 LAF 时使用的 Substance 委托例外
我正在尝试升级我的应用程序以使用最新的物质 L&F,但问题是
Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: Substance delegate used when Substance is not the current LAF [component JButton in window App under Substance Business Blue Steel]
at org.pushingpixels.substance.internal.utils.SubstanceCoreUtilities.traceSubstanceApiUsage(SubstanceCoreUtilities.java:1972)
at org.pushingpixels.substance.internal.utils.SubstanceColorSchemeUtilities.getColorScheme(SubstanceColorSchemeUtilities.java:269)
at org.pushingpixels.substance.api.SubstanceLookAndFeel.getDisabledIcon(SubstanceLookAndFeel.java:2267)
at javax.swing.AbstractButton.getDisabledIcon(AbstractButton.java:666)
at com.apple.laf.AquaButtonUI.paintIcon(AquaButtonUI.java:356)
at com.apple.laf.AquaButtonUI.paint(AquaButtonUI.java:295)
at javax.swing.plaf.ComponentUI.update(ComponentUI.java:153)
at javax.swing.JComponent.paintComponent(JComponent.java:752)
at javax.swing.JComponent.paint(JComponent.java:1029)
at javax.swing.JComponent.paintChildren(JComponent.java:862)
at javax.swing.JComponent.paint(JComponent.java:1038)
at javax.swing.JComponent.paintChildren(JComponent.java:862)
at javax.swing.JComponent.paint(JComponent.java:1038)
at javax.swing.JComponent.paintChildren(JComponent.java:862)
at javax.swing.JComponent.paint(JComponent.java:1038)
at javax.swing.JComponent.paintChildren(JComponent.java:862)
at javax.swing.JComponent.paint(JComponent.java:1038)
at javax.swing.JLayeredPane.paint(JLayeredPane.java:567)
at javax.swing.JComponent.paintChildren(JComponent.java:862)
at javax.swing.JComponent.paint(JComponent.java:1038)
at java.awt.GraphicsCallback$PaintCallback.run(GraphicsCallback.java:34)
at sun.awt.SunGraphicsCallback.runOneComponent(SunGraphicsCallback.java:60)
at sun.awt.SunGraphicsCallback.runComponents(SunGraphicsCallback.java:97)
at java.awt.Container.paint(Container.java:1793)
at java.awt.Window.paint(Window.java:3375)
at sun.awt.RepaintArea.paintComponent(RepaintArea.java:276)
at sun.awt.RepaintArea.paint(RepaintArea.java:241)
at apple.awt.ComponentModel.handleEvent(ComponentModel.java:263)
at apple.awt.CWindow.handleEvent(CWindow.java:465)
at java.awt.Component.dispatchEventImpl(Component.java:4790)
at java.awt.Container.dispatchEventImpl(Container.java:2143)
at java.awt.Window.dispatchEventImpl(Window.java:2478)
at java.awt.Component.dispatchEvent(Component.java:4544)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:635)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: Substance delegate used when Substance is not the current LAF [component JButton in window App under Substance Business Blue Steel]
at org.pushingpixels.substance.internal.utils.SubstanceCoreUtilities.traceSubstanceApiUsage(SubstanceCoreUtilities.java:1972)
at org.pushingpixels.substance.internal.utils.SubstanceColorSchemeUtilities.getColorScheme(SubstanceColorSchemeUtilities.java:269)
at org.pushingpixels.substance.api.SubstanceLookAndFeel.getDisabledIcon(SubstanceLookAndFeel.java:2267)
at javax.swing.AbstractButton.getDisabledIcon(AbstractButton.java:666)
at com.apple.laf.AquaButtonUI.paintIcon(AquaButtonUI.java:356)
at com.apple.laf.AquaButtonUI.paint(AquaButtonUI.java:295)
at javax.swing.plaf.ComponentUI.update(ComponentUI.java:153)
at javax.swing.JComponent.paintComponent(JComponent.java:752)
at javax.swing.JComponent.paint(JComponent.java:1029)
at javax.swing.JComponent.paintChildren(JComponent.java:862)
at javax.swing.JComponent.paint(JComponent.java:1038)
at javax.swing.JComponent.paintChildren(JComponent.java:862)
at javax.swing.JComponent.paint(JComponent.java:1038)
at javax.swing.JComponent.paintChildren(JComponent.java:862)
at javax.swing.JComponent.paint(JComponent.java:1038)
at javax.swing.JComponent.paintChildren(JComponent.java:862)
at javax.swing.JComponent.paint(JComponent.java:1038)
at javax.swing.JLayeredPane.paint(JLayeredPane.java:567)
at javax.swing.JComponent.paintChildren(JComponent.java:862)
at javax.swing.JComponent.paint(JComponent.java:1038)
at javax.swing.JComponent._paintImmediately(JComponent.java:5098)
at javax.swing.JComponent.paintImmediately(JComponent.java:4882)
at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:811)
at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:713)
at javax.swing.RepaintManager.seqPaintDirtyRegions(RepaintManager.java:693)
at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:125)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:633)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
当我使用以前的版本时出现以下异常,我没有这样的错误,并且我已经设置了物质依赖性!
谢谢
I'm trying to upgrade my app to use the latest drop of substance L&F but the problem is that I got the Following exception
Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: Substance delegate used when Substance is not the current LAF [component JButton in window App under Substance Business Blue Steel]
at org.pushingpixels.substance.internal.utils.SubstanceCoreUtilities.traceSubstanceApiUsage(SubstanceCoreUtilities.java:1972)
at org.pushingpixels.substance.internal.utils.SubstanceColorSchemeUtilities.getColorScheme(SubstanceColorSchemeUtilities.java:269)
at org.pushingpixels.substance.api.SubstanceLookAndFeel.getDisabledIcon(SubstanceLookAndFeel.java:2267)
at javax.swing.AbstractButton.getDisabledIcon(AbstractButton.java:666)
at com.apple.laf.AquaButtonUI.paintIcon(AquaButtonUI.java:356)
at com.apple.laf.AquaButtonUI.paint(AquaButtonUI.java:295)
at javax.swing.plaf.ComponentUI.update(ComponentUI.java:153)
at javax.swing.JComponent.paintComponent(JComponent.java:752)
at javax.swing.JComponent.paint(JComponent.java:1029)
at javax.swing.JComponent.paintChildren(JComponent.java:862)
at javax.swing.JComponent.paint(JComponent.java:1038)
at javax.swing.JComponent.paintChildren(JComponent.java:862)
at javax.swing.JComponent.paint(JComponent.java:1038)
at javax.swing.JComponent.paintChildren(JComponent.java:862)
at javax.swing.JComponent.paint(JComponent.java:1038)
at javax.swing.JComponent.paintChildren(JComponent.java:862)
at javax.swing.JComponent.paint(JComponent.java:1038)
at javax.swing.JLayeredPane.paint(JLayeredPane.java:567)
at javax.swing.JComponent.paintChildren(JComponent.java:862)
at javax.swing.JComponent.paint(JComponent.java:1038)
at java.awt.GraphicsCallback$PaintCallback.run(GraphicsCallback.java:34)
at sun.awt.SunGraphicsCallback.runOneComponent(SunGraphicsCallback.java:60)
at sun.awt.SunGraphicsCallback.runComponents(SunGraphicsCallback.java:97)
at java.awt.Container.paint(Container.java:1793)
at java.awt.Window.paint(Window.java:3375)
at sun.awt.RepaintArea.paintComponent(RepaintArea.java:276)
at sun.awt.RepaintArea.paint(RepaintArea.java:241)
at apple.awt.ComponentModel.handleEvent(ComponentModel.java:263)
at apple.awt.CWindow.handleEvent(CWindow.java:465)
at java.awt.Component.dispatchEventImpl(Component.java:4790)
at java.awt.Container.dispatchEventImpl(Container.java:2143)
at java.awt.Window.dispatchEventImpl(Window.java:2478)
at java.awt.Component.dispatchEvent(Component.java:4544)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:635)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: Substance delegate used when Substance is not the current LAF [component JButton in window App under Substance Business Blue Steel]
at org.pushingpixels.substance.internal.utils.SubstanceCoreUtilities.traceSubstanceApiUsage(SubstanceCoreUtilities.java:1972)
at org.pushingpixels.substance.internal.utils.SubstanceColorSchemeUtilities.getColorScheme(SubstanceColorSchemeUtilities.java:269)
at org.pushingpixels.substance.api.SubstanceLookAndFeel.getDisabledIcon(SubstanceLookAndFeel.java:2267)
at javax.swing.AbstractButton.getDisabledIcon(AbstractButton.java:666)
at com.apple.laf.AquaButtonUI.paintIcon(AquaButtonUI.java:356)
at com.apple.laf.AquaButtonUI.paint(AquaButtonUI.java:295)
at javax.swing.plaf.ComponentUI.update(ComponentUI.java:153)
at javax.swing.JComponent.paintComponent(JComponent.java:752)
at javax.swing.JComponent.paint(JComponent.java:1029)
at javax.swing.JComponent.paintChildren(JComponent.java:862)
at javax.swing.JComponent.paint(JComponent.java:1038)
at javax.swing.JComponent.paintChildren(JComponent.java:862)
at javax.swing.JComponent.paint(JComponent.java:1038)
at javax.swing.JComponent.paintChildren(JComponent.java:862)
at javax.swing.JComponent.paint(JComponent.java:1038)
at javax.swing.JComponent.paintChildren(JComponent.java:862)
at javax.swing.JComponent.paint(JComponent.java:1038)
at javax.swing.JLayeredPane.paint(JLayeredPane.java:567)
at javax.swing.JComponent.paintChildren(JComponent.java:862)
at javax.swing.JComponent.paint(JComponent.java:1038)
at javax.swing.JComponent._paintImmediately(JComponent.java:5098)
at javax.swing.JComponent.paintImmediately(JComponent.java:4882)
at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:811)
at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:713)
at javax.swing.RepaintManager.seqPaintDirtyRegions(RepaintManager.java:693)
at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:125)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:633)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
when I used the pervious version I don't have such error and I have set up the substance dependencies !
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
问题是我在主线程中设置外观并在不同的线程中调用 GUI。
The problem was that I'm setting the look and feel in the main thread and calling the GUI in a different thread.