Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to use rgb color values to set JPanel background color

 
Punit Jain
Ranch Hand
Posts: 1012
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how to use RGB values to set JPanel Background color, which is not in the color list...
i tried like this but not working for me..



 
Darryl Burke
Bartender
Posts: 5125
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use code tags, not quote tags for code. I've fixed it for you this time.

Your code looks reasonable, which usually means the problem is elsewhere, in code you haven't shown us. To get better help sooner, post a SSCCE (Short, Self Contained, Compilable and Executable) example that demonstrates the problem.

edit No, it isn't reasonable. Why do you qualify the variable myBlue with the Color class? That shouldn't even compile, and doesn't make any sense.
 
Punit Jain
Ranch Hand
Posts: 1012
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes i got it it's working for me now thanks...

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic