Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

problem in static JLabel text  RSS feed

 
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
Sheriff
Posts: 24215
37
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
Boost this thread!