i appending text to text area for every sec i wanted to overwrite or clear the old text and i want write new data for every one sec how to do this in java?
Thanks raksha
i appending text to text area for every sec i wanted to overwrite or clear the old text and i want write new data for every one sec how to do this in java?
Thanks raksha
To do something periodically you need some thread, but be aware to use SwingWorker. If not your GUI may freeze.
I guess you are talking about a Swing
JTextArea
.You can just call
setText(...)
on it to replace the text: