View Full Version : GUI with "scrollable label"?

01-10-2012, 09:54 PM
Hi, I'm writing a program that transfers files from a folder to another. What I want to do is to somehow list all the files that it's transferring as it goes. This works fine in console, since I can just use System.out.println. However, now I need to somehow achieve the same result through my GUI. Just to be clear, I need to be able to scroll up to view files that have already been transferred.

I'm really stuck at this, and would appreciate any form of help or guidance!

01-10-2012, 10:00 PM
IMO the easiest way would be to use a JTextArea, attached to a JScrollPane, and simply append the data to the underlying text area and repaint. Alter the textArea by setting the setEditable to true (I think that's what the method is on it :/).

01-10-2012, 10:37 PM
I'll try that, thank you!