Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Dynamically change tab color JTabbedPane

 
Fille Janssens
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to change the tab backgroundcolor from black to red after the user has made a particular selection. I can set the black backgroundcolor at application start, but I'm unable to change the color after that.

Does anybody know how to achieve this?
 
Craig Wood
Ranch Hand
Pie
Posts: 1535
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This might be plaf–related if you're using win xp. See bug reports 5032785 and the related (via link) 4880747, esp. the evaluation sections.
Here's an exploratory test
 
Fille Janssens
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It seems possible to change the tab background color using the setBackgroundAt() method with the jre 1.5. I got it working while using SuSe linux as well with Win XP sp2.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic