aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes Change the Color of Title of JTabbedPane Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Change the Color of Title of JTabbedPane" Watch "Change the Color of Title of JTabbedPane" New topic
Author

Change the Color of Title of JTabbedPane

Chinmay Kant
Greenhorn

Joined: Feb 04, 2008
Posts: 20
Assume there are many tabbed panes in a window.

If JtabbedPane is not active then change color of Title Bar of Tabbed Pane to gray, just like in eclipse,
If Active, the Color of the Title Bar of Tabbed Pane is Blue.

How can i achieve this Functionality??


Thanks and Regards,
Chinmay
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19670
    
  18

I checked the basic look&feel class for tabbed panes, and found the following color properties:
  • TabbedPane.light
  • TabbedPane.highlight
  • TabbedPane.shadow
  • TabbedPane.darkShadow
  • TabbedPane.focus
  • TabbedPane.selected
  • TabbedPane.selectedForeground
  • TabbedPane.contentAreaColor
  • TabbedPane.tabAreaBackground
  • control
  • You can set these as follows:

    Now I don't really know which of these properties you should change, but you can find out by testing.


    SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
    How To Ask Questions How To Answer Questions
     
    I agree. Here's the link: http://aspose.com/file-tools
     
    subject: Change the Color of Title of JTabbedPane