• Post Reply Bookmark Topic Watch Topic
  • New Topic

Container Colour

 
Tim Pat Joe clifford
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could you tell me how to change of a container?
Container.setBackground(Color c)

Tried, Container.setBackground(Color c), but doesnt change the colour. Anything else i should do or could do?
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's how you change the background color... however, most containers also need to have setOpaque( true ) called on them, because their default behavior is to let the background of their parent component through.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!