my dog learned polymorphism
The moose likes Swing / AWT / SWT and the fly likes problem in static JLabel text Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Reply Bookmark "problem in static JLabel text" Watch "problem in static JLabel text" New topic
Author

problem in static JLabel text

narasimharao konjeti
Ranch Hand

Joined: Apr 26, 2003
Posts: 130
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


"Unwise to sweat petty stuff, wise to pet sweaty stuff."
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24057
    
  13

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.


[Jess in Action][AskingGoodQuestions]
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: problem in static JLabel text
 
Similar Threads
flickering problem when i use html in jlabel text
JButton Problem ?
jlabel problem
passing text from JDialog to JFrame
JLabel problem