Closed javacoda closed 12 years ago
I encounter the same problem with the Java 7 release.
I am currently using the standard JColourChooser UI delegate instead of the much nicer Substance one with the following code (in case this helps anyone else):
UIManager.setLookAndFeel( skin ); UIManager.put("ColorChooserUI", BasicColorChooserUI.class.getName());
Am still hoping that this bug can be fixed sometime soon though ...
Thanks for your recommendation.
I have written a simple JDialog to display a JColorChooser and a few buttons, but even with the latest insubstantial (V6.3) and Trident V1.3 I am getting the following exception as soon as the dialog loads with JDK 7:
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at javax.swing.JSlider.imageUpdate(JSlider.java:770) at sun.awt.image.ImageWatched$WeakLink.newInfo(ImageWatched.java:132) at sun.awt.image.ImageWatched.newInfo(ImageWatched.java:169) at sun.awt.image.ImageRepresentation.imageComplete(ImageRepresentation.java:719) at java.awt.image.MemoryImageSource.addConsumer(MemoryImageSource.java:280) at java.awt.image.MemoryImageSource.startProduction(MemoryImageSource.java:316) at sun.awt.image.ImageRepresentation.startProduction(ImageRepresentation.java:727) at sun.awt.image.ImageRepresentation.drawToBufImage(ImageRepresentation.java:802) at sun.java2d.pipe.DrawImage.copyImage(DrawImage.java:1018) at sun.java2d.SunGraphics2D.drawImage(SunGraphics2D.java:3062) at sun.java2d.SunGraphics2D.drawImage(SunGraphics2D.java:3047) at org.pushingpixels.substance.internal.contrib.randelshofer.quaqua.colorchooser.ColorSliderUI.paintColorTrack(ColorSliderUI.java:397) at org.pushingpixels.substance.internal.contrib.randelshofer.quaqua.colorchooser.ColorSliderUI.paintTrack(ColorSliderUI.java:248) at javax.swing.plaf.basic.BasicSliderUI.paint(BasicSliderUI.java:929) at javax.swing.plaf.ComponentUI.update(ComponentUI.java:161) at org.pushingpixels.substance.internal.contrib.randelshofer.quaqua.colorchooser.ColorSliderUI.orgpushingpixelssubstanceinternalcontribrandelshoferquaquacolorchooserColorSliderUIupdate(ColorSliderUI.java) at org.pushingpixels.substance.internal.contrib.randelshofer.quaqua.colorchooser.ColorSliderUI.update(ColorSliderUI.java) at javax.swing.JComponent.paintComponent(JComponent.java:778) at javax.swing.JComponent.paint(JComponent.java:1054) at javax.swing.JComponent.paintChildren(JComponent.java:887) at javax.swing.JComponent.paint(JComponent.java:1063) at javax.swing.colorchooser.AbstractColorChooserPanel.paint(AbstractColorChooserPanel.java:205) at javax.swing.JComponent.paintChildren(JComponent.java:887) at javax.swing.JComponent.paint(JComponent.java:1063) at javax.swing.JComponent.paintChildren(JComponent.java:887) at javax.swing.JComponent.paint(JComponent.java:1063) at javax.swing.JComponent.paintChildren(JComponent.java:887) at javax.swing.JComponent.paint(JComponent.java:1063) at javax.swing.JComponent.paintChildren(JComponent.java:887) at javax.swing.JComponent.paint(JComponent.java:1063) at javax.swing.JComponent.paintChildren(JComponent.java:887) at javax.swing.JComponent.paint(JComponent.java:1063) at javax.swing.JComponent.paintChildren(JComponent.java:887) at javax.swing.JComponent.paint(JComponent.java:1063) at javax.swing.JComponent.paintChildren(JComponent.java:887) at javax.swing.JComponent.paint(JComponent.java:1063) at javax.swing.JLayeredPane.paint(JLayeredPane.java:585) at javax.swing.JComponent.paintChildren(JComponent.java:887) at javax.swing.JComponent.paintToOffscreen(JComponent.java:5228) at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(RepaintManager.java:1482) at javax.swing.RepaintManager$PaintManager.paint(RepaintManager.java:1413) at javax.swing.RepaintManager.paint(RepaintManager.java:1206) at javax.swing.JComponent.paint(JComponent.java:1040) at java.awt.GraphicsCallback$PaintCallback.run(GraphicsCallback.java:39) at sun.awt.SunGraphicsCallback.runOneComponent(SunGraphicsCallback.java:78) at sun.awt.SunGraphicsCallback.runComponents(SunGraphicsCallback.java:115) at java.awt.Container.paint(Container.java:1967) at java.awt.Window.paint(Window.java:3867) at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:781) at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:728) at javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:677) at javax.swing.RepaintManager.access$700(RepaintManager.java:59) at javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1621) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:705) at java.awt.EventQueue.access$000(EventQueue.java:101) at java.awt.EventQueue$3.run(EventQueue.java:666) at java.awt.EventQueue$3.run(EventQueue.java:664) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76) at java.awt.EventQueue.dispatchEvent(EventQueue.java:675) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:211) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:121) at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:182) at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:221) at java.security.AccessController.doPrivileged(Native Method) at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:219) at java.awt.Dialog.show(Dialog.java:1072) at java.awt.Component.show(Component.java:1650) at java.awt.Component.setVisible(Component.java:1602) at java.awt.Window.setVisible(Window.java:1013) at java.awt.Dialog.setVisible(Dialog.java:1003) at viewer.Viewer.jMenuItemBackgroundColourActionPerformed(Viewer.java:2443) at viewer.Viewer.access$2200(Viewer.java:246) at viewer.Viewer$17.actionPerformed(Viewer.java:1729) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259) at javax.swing.AbstractButton.doClick(AbstractButton.java:376) at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:833) at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:877) at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289) at java.awt.Component.processMouseEvent(Component.java:6504) at javax.swing.JComponent.processMouseEvent(JComponent.java:3321) at java.awt.Component.processEvent(Component.java:6269) at java.awt.Container.processEvent(Container.java:2229) at java.awt.Component.dispatchEventImpl(Component.java:4860) at java.awt.Container.dispatchEventImpl(Container.java:2287) at java.awt.Component.dispatchEvent(Component.java:4686) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422) at java.awt.Container.dispatchEventImpl(Container.java:2273) at java.awt.Window.dispatchEventImpl(Window.java:2713) at java.awt.Component.dispatchEvent(Component.java:4686) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:707) at java.awt.EventQueue.access$000(EventQueue.java:101) at java.awt.EventQueue$3.run(EventQueue.java:666) at java.awt.EventQueue$3.run(EventQueue.java:664) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87) at java.awt.EventQueue$4.run(EventQueue.java:680) at java.awt.EventQueue$4.run(EventQueue.java:678) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76) at java.awt.EventQueue.dispatchEvent(EventQueue.java:677) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:211) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105) at java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
Any ideas on how to fix this? It a showstopping problem for me at the moment - thanks in advance.