Need Help on monitoring progresses

i have a function (actionPerformed) that takes a lot of time. hence i decided to display some message to the user in a text area in a JFrame. Here am trying to display some messages in the text area as long as the process is being done. but the problem am facing is that after using setText to set the new message in the text area..am not able to see it on the screen. i tried using repaint and refresh on both the text areas and the jframe. but it didnt work.

does anyone have a solution for this?

[526 byte] By [anande99] at [2007-9-26 3:14:13]
# 1

hi

from my experience, until function finished nothing come up on the screen no mater what, that cause your TextArea to display the last text you set.

to solve this problem you should do your progress in a Thread by passing it your TextArea object and set the text from the thread.

goodluck...

amitmasl at 2007-6-29 11:24:14 > top of Java-index,Archived Forums,Swing...