• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Change the Color of Title of JTabbedPane

 
Chinmay Kant
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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??
 
Rob Spoor
Sheriff
Pie
Posts: 20512
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
     
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic