Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem in static JLabel text

 
narasimharao konjeti
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,
I have created one static JLabel, and i am going to change the label value dynamically. and while i am program is executing, jlabel.setText() is not refreshing. what might be the problem...
please let me know if any solution.
regards
nr konjeti
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24211
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If the label's size will change, then you need to call validate() on the label's container after changing the text. Otherwise, a simple repaint() call should do.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic