Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JLabel Icon and Text

836003Aug 3 2011 — edited Aug 4 2011
Hi,

I am creating a JLabel and setting an ICon with setIcon method. The label has a square border and a text. The Icon covers the the label with "X" form corner to corner on the square border. I can't see the text after setting the Icon. I tried to set the text after Icon, still it is hidden.

So what should I do to display the Icon and Text at the same time and want the text to be visible.

thanks,
NT
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 1 2011
Added on Aug 3 2011
4 comments
293 views