Re: Distinguish better between active and non-active JInternalFrames
- From: Vova Reznik <address@xxxxxxxx>
- Date: Thu, 18 May 2006 13:59:39 GMT
Uwe Ziegenhagen wrote:
Hello,
depending on the L & F and the monitor it is sometimes a bit hard to see
which Jinternalframe is the active one. Is there any way to change e.g.
the color of the title background without the need to reprogram a lot?
Uwe
Read about javax.swing.UIManager
Using this class you may set/change some L&F values.
For example default values:
InternalFrame.activeTitleBackground
javax.swing.plaf.ColorUIResource[r=184,g=207,b=229]
InternalFrame.inactiveTitleBackground
javax.swing.plaf.ColorUIResource[r=238,g=238,b=238]
You may change any value, but then you need to update UI:
javax.swing.SwingUtilities.updateComponentTreeUI(Component)
Always use xxxUIResources instead plain classes
(ColorUIResource instead of Color)
Changing L&F setting in very beginning of your program
doesn't require call to updateComponentTreeUI(Component)
.
- References:
- Distinguish better between active and non-active JInternalFrames
- From: Uwe Ziegenhagen
- Distinguish better between active and non-active JInternalFrames
- Prev by Date: Re: JTree expand event
- Next by Date: Re: JTree expand event
- Previous by thread: Distinguish better between active and non-active JInternalFrames
- Next by thread: JTree expand event
- Index(es):
Relevant Pages
|