United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6389798 GTK L&F: java.lang.IllegalArgumentException: Color parameter outside of expected range
JDK-6389798 : GTK L&F: java.lang.IllegalArgumentException: Color parameter outside of expected range

Details
Type:
Bug
Submit Date:
2006-02-23
Status:
Closed
Updated Date:
2011-02-16
Project Name:
JDK
Resolved Date:
2006-04-12
Component:
client-libs
OS:
linux,solaris_10
Sub-Component:
javax.swing
CPU:
x86,sparc
Priority:
P2
Resolution:
Fixed
Affected Versions:
5.0u25,6
Fixed Versions:

Related Reports
Backport:
Backport:

Sub Tasks

Description
Reproducible on two platforms:
- Fedora Core 4 Linux with Clearlooks theme
- Fedora Core 2 Linux with Clearlooks theme

With recent jdk 6.0 builds (b69 - b73 at least), every time I start SwingSet2 and switch to GTK L&F (while in Internal Frames Demo), I see the following exception on EDT (and SwingSet GUI is busted):

Note: Previously (some time ago), this demo worked but looked ugly:
http://javaweb.sfbay/~vvs/Screenshot-SwingSet2.png
(with translucent broken borders)

/opt/java6/bin/java -jar SwingSet2.jar
Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: Color parameter outside of expected range: Red Green Blue
        at java.awt.Color.testColorValueRange(Color.java:285)
        at java.awt.Color.<init>(Color.java:369)
        at java.awt.Color.<init>(Color.java:344)
        at com.sun.java.swing.plaf.gtk.Metacity.parseColor(Metacity.java:1594)
        at com.sun.java.swing.plaf.gtk.Metacity.drawTitle(Metacity.java:958)
        at com.sun.java.swing.plaf.gtk.Metacity.draw(Metacity.java:1359)
        at com.sun.java.swing.plaf.gtk.Metacity.drawInclude(Metacity.java:1311)
        at com.sun.java.swing.plaf.gtk.Metacity.draw(Metacity.java:1333)
        at com.sun.java.swing.plaf.gtk.Metacity.drawPiece(Metacity.java:1387)
        at com.sun.java.swing.plaf.gtk.Metacity.paintFrameBorder(Metacity.java:428)
        at com.sun.java.swing.plaf.gtk.GTKPainter.paintInternalFrameBorder(GTKPainter.java:244)
        at javax.swing.plaf.synth.SynthInternalFrameUI.paintBorder(SynthInternalFrameUI.java:176)
        at javax.swing.plaf.synth.SynthBorder.paintBorder(SynthBorder.java:46)
        at javax.swing.JComponent.paintBorder(JComponent.java:862)
        at javax.swing.JComponent.paint(JComponent.java:968)
        at javax.swing.JComponent.paintChildren(JComponent.java:804)
        at javax.swing.JComponent.paint(JComponent.java:976)
        at javax.swing.JLayeredPane.paint(JLayeredPane.java:559)
        at javax.swing.JComponent.paintChildren(JComponent.java:804)
        at javax.swing.JComponent.paint(JComponent.java:976)
        at javax.swing.JComponent.paintChildren(JComponent.java:804)
        at javax.swing.JComponent.paint(JComponent.java:976)
        at javax.swing.JComponent.paintChildren(JComponent.java:804)
        at javax.swing.JComponent.paint(JComponent.java:976)
        at javax.swing.JComponent.paintChildren(JComponent.java:804)
        at javax.swing.JComponent.paint(JComponent.java:976)
        at javax.swing.JComponent.paintChildren(JComponent.java:804)
        at javax.swing.JComponent.paint(JComponent.java:976)
        at javax.swing.JComponent.paintChildren(JComponent.java:804)
        at javax.swing.JComponent.paint(JComponent.java:976)
        at javax.swing.JLayeredPane.paint(JLayeredPane.java:559)
        at javax.swing.JComponent.paintChildren(JComponent.java:804)
        at javax.swing.JComponent.paintToOffscreen(JComponent.java:5083)
        at javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:279)
        at javax.swing.RepaintManager.paint(RepaintManager.java:1105)
        at javax.swing.JComponent.paint(JComponent.java:953)
        at java.awt.GraphicsCallback$PaintCallback.run(GraphicsCallback.java:21)
        at sun.awt.SunGraphicsCallback.runOneComponent(SunGraphicsCallback.java:60)
        at sun.awt.SunGraphicsCallback.runComponents(SunGraphicsCallback.java:97)
        at java.awt.Container.paint(Container.java:1709)
        at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:724)
        at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:670)
        at javax.swing.RepaintManager.seqPaintDirtyRegions(RepaintManager.java:650)
        at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:128)
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: Color parameter outside of expected range: Red Green Blue
        at java.awt.Color.testColorValueRange(Color.java:285)
        at java.awt.Color.<init>(Color.java:369)
        at java.awt.Color.<init>(Color.java:344)
        at com.sun.java.swing.plaf.gtk.Metacity.parseColor(Metacity.java:1594)
        at com.sun.java.swing.plaf.gtk.Metacity.drawTitle(Metacity.java:958)
        at com.sun.java.swing.plaf.gtk.Metacity.draw(Metacity.java:1359)
        at com.sun.java.swing.plaf.gtk.Metacity.drawInclude(Metacity.java:1311)
        at com.sun.java.swing.plaf.gtk.Metacity.draw(Metacity.java:1333)
        at com.sun.java.swing.plaf.gtk.Metacity.drawPiece(Metacity.java:1387)
        at com.sun.java.swing.plaf.gtk.Metacity.paintFrameBorder(Metacity.java:428)
        at com.sun.java.swing.plaf.gtk.GTKPainter.paintInternalFrameBorder(GTKPainter.java:244)
        at javax.swing.plaf.synth.SynthInternalFrameUI.paintBorder(SynthInternalFrameUI.java:176)
        at javax.swing.plaf.synth.SynthBorder.paintBorder(SynthBorder.java:46)
        at javax.swing.JComponent.paintBorder(JComponent.java:862)
        at javax.swing.JComponent.paint(JComponent.java:968)
        at javax.swing.JComponent.paintChildren(JComponent.java:804)
        at javax.swing.JComponent.paint(JComponent.java:976)
        at javax.swing.JLayeredPane.paint(JLayeredPane.java:559)
        at javax.swing.JComponent.paintToOffscreen(JComponent.java:5076)
        at javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:279)
        at javax.swing.RepaintManager.paint(RepaintManager.java:1105)
        at javax.swing.JComponent._paintImmediately(JComponent.java:5024)
        at javax.swing.JComponent.paintImmediately(JComponent.java:4842)
        at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:714)
        at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:670)
        at javax.swing.RepaintManager.seqPaintDirtyRegions(RepaintManager.java:650)
        at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:128)
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)

                                    

Comments
EVALUATION

Metacity supports Blend format blend/bg_color/fg_color/alpha where 0.0<alpha<1.0
There is however a theme for ClearLooks (http://art.gnome.org/themes/metacity/1190) where this rule is broken i.e. blend/fg_color/bg_color/alpha and alpha > 1.0
Metacity works well with this file so we should also support it.
                                     
2006-03-22



Hardware and Software, Engineered to Work Together