Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization 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: 5125
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