• Post Reply Bookmark Topic Watch Topic
  • New Topic

Not matter what I did, the background color of the JTabbedPane is light blue? How come?  RSS feed

 
Jacky Luk
Ranch Hand
Posts: 634
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No matter what I did, and searching for every piece of setBackground,
The background color of the JTabbedPane is light blue.
Any ideas why?
I need a savior of the day.
Thanks
Jack




 
Martin Vajsar
Sheriff
Posts: 3752
62
Chrome Netbeans IDE Oracle
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'd suggest experimenting with colors using a paint program or something, just to make sure the Color(191,191,191) doesn't appear blue on your display. That might happen. Alternatively you might take a screenshot of your program and use the paint app to inspect the exact RGB of the color that appears blue to you.
 
Jacky Luk
Ranch Hand
Posts: 634
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Martin Vajsar wrote:I'd suggest experimenting with colors using a paint program or something, just to make sure the Color(191,191,191) doesn't appear blue on your display. That might happen. Alternatively you might take a screenshot of your program and use the paint app to inspect the exact RGB of the color that appears blue to you.


Hi Martin,
Your approach really does work. I find the color was set in the UIManager, I changed that, and it works as expected.
Thanks
Jack
 
Martin Vajsar
Sheriff
Posts: 3752
62
Chrome Netbeans IDE Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just to clarify, I got the Color(191,191,191) from your own code:

I wasn't trying to hint at UIManager here, but I'm glad you've resolved it.
 
m Korbel
Ranch Hand
Posts: 174
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
- most of methods is protected in JTabbedPanes API, then isn't accesible directly,

- nor for Windows(Classic)LookAndFeel, those methods are based on peer from Native OS (settongs for theme, font ....)

- again not an SSCCE (note SSCCE.org will disappear forever at the end of February, finall decision by @Andrew Thompson)
 
Martin Vajsar
Sheriff
Posts: 3752
62
Chrome Netbeans IDE Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
m Korbel wrote:(note SSCCE.org will disappear forever at the end of February, finall decision by @Andrew Thompson)

Not really, see SSCCE will soon be moving right here to the Wiki!.

But I agree that Jacky should really read that document at last.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!