This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

removing space for text in JLabel . . .

 
Sanjeev Charla
Ranch Hand
Posts: 90
Firefox Browser Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
when displaying a JLabel with only icon, there is some reserved space for text even the text is "".
So, how to display a JLabel by completely filled with icon only?
Thank you.
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What about setText(null) ?
 
Sanjeev Charla
Ranch Hand
Posts: 90
Firefox Browser Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Result is same, by setting the text to null !
Thanks for your response.
 
Darryl Burke
Bartender
Posts: 5148
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sanjeev charla wrote:when displaying a JLabel with only icon, there is some reserved space for text even the text is "".

No there isn't.
So, how to display a JLabel by completely filled with icon only?

Post a SSCCE that demonstrates the problem.

edit For example, this SSCCE shows that there isn't a problem.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic