Win a copy of Head First Agile this week in the Agile forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Taking time out to refresh a Component.  RSS feed

Tim Berglund
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have the sense that this question has been asked and answered here before. I browsed through a few pages of this forum, but I didn't find anything that looked close. So here goes...
I have a JLabel component being updated by a time-consuming method call by means of a callback interface. I would like the label to display the method's progress in real time. When the method calls setText() on the label object (though an implementation of the callback interface, of course), nothing happens. Guessing, I have tried calling repaint() on the label and various of its containers to no avail.
I suspect this is very simple. What's the trick?
Thanks for your help,
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!