This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Color Problem  RSS feed

 
erdem ozdemir
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator



When I run this code, I saw that the bottom of the program's color is gray, although I made the color of labels filling bottom of program white.

I think, in a similar manner, when mouse is over one of labels, It should be shown in a cyan color, it was still gray. How could I solve this problem?

Answers will be appreciated..
Thank you.
 
Craig Wood
Ranch Hand
Posts: 1535
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JLabel is non–opaque by default. To make it so you can set a background color
use the JComponent method setOpaque for the label:

[ August 10, 2005: Message edited by: Craig Wood ]
 
erdem ozdemir
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much,
I learned one more thing I did not know...

great..
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!