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

JLabel setBackround

 
simon keillor
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Have a JLabel with some text in. Can change the colour of the text, but only seem able to change the backgroud to black or white. Code I use is as follows (the class extends a JLabel, actionPerformed relates to a PopUpMenu from the JLabel)



Is there some restriction on the background color of JLabels, or have I missed something screamingly obvious

Cheers

Simon
 
simon keillor
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
SORRY SORRY SORRY

Just looking throught my code again, when I set my action command for that menu item I'd mispelled the word orange (had put ornage).

Monday morning, brain not in gear yet (my excuse anyway!!)

Thanks for taking a look anyway.

Simon
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm glad we could help out as your Cardboard Analyst.

I'm moving this to the Swing / JFC / AWT forum...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic