JXTaskPaneContainer bottom color

View: New views
3 Messages — Rating Filter:   Alert me  

JXTaskPaneContainer bottom color

by jdnc-interest :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

I try to retrieve the color at the bottom of my JXTaskPaneContainer. If I use the getBackground() method, I get the color at the top of the JXTaskPaneContainer, and since it is painted with a gradient, this color i very different from the one at the bottom. If I use UIManager.get("TaskPaneContainer.background"), I get the same result.

UIManager.get("TaskPaneContainer.backgroundGradienEnd") and UIManager.get("TaskPaneContainer.backgroundGradienStart") return null.

How can I do ?

Thanks a lot in advance.
Regards,

Guillaume.

PS : I need this color because I have to add a JPanel next to the JXTaskPaneContainer, at its bottom, and I'd like it to be of the same color.
[Message sent by forum member 'gdhion' (gdhion)]

http://forums.java.net/jive/thread.jspa?messageID=289080

---------------------------------------------------------------------
To unsubscribe, e-mail: jdnc-unsubscribe@...
For additional commands, e-mail: jdnc-help@...


Re: JXTaskPaneContainer bottom color

by jdnc-interest :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

The colors are painted via a Painter, accessible by getBackgroundPainter().  By default this is a PainterUIResource containing a MattePainter.  The values for the gradient are not readily accesible, programatically.  You can choose to install your own painter.  Or look up the values the gradient uses in TaskPaneContainerAddon.

Karl
[Message sent by forum member 'kschaefe' (kschaefe)]

http://forums.java.net/jive/thread.jspa?messageID=289095

---------------------------------------------------------------------
To unsubscribe, e-mail: jdnc-unsubscribe@...
For additional commands, e-mail: jdnc-help@...


Re: JXTaskPaneContainer bottom color

by jdnc-interest :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thank you very much Karl !

The source code of TaskPaneContainerAddon was what I needed !

Guillaume.
[Message sent by forum member 'gdhion' (gdhion)]

http://forums.java.net/jive/thread.jspa?messageID=289260

---------------------------------------------------------------------
To unsubscribe, e-mail: jdnc-unsubscribe@...
For additional commands, e-mail: jdnc-help@...

LightInTheBox - Buy quality products at wholesale price