aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes JLabel setBackround Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JLabel setBackround" Watch "JLabel setBackround" New topic
Author

JLabel setBackround

simon keillor
Greenhorn

Joined: Jun 23, 2004
Posts: 24
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
simon keillor
Greenhorn

Joined: Jun 23, 2004
Posts: 24
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

Joined: Dec 10, 2001
Posts: 7023
I'm glad we could help out as your Cardboard Analyst.

I'm moving this to the Swing / JFC / AWT forum...


[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: JLabel setBackround