Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem chaning text on JCheckbox

 
James McDee
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
After executing setText(str) on a JCheckbox, the string is set but the size of the JCheckbox does not change. Repaint() did not help me.
What is necessary to resize the component so that all of the text is displayed?
James.
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try validate() or invalidate()... the problem is that the component needs to be re-layed out... not just repainted.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!