Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Jul 2010
    Posts
    44
    Thanks
    1
    Thanked 0 Times in 0 Posts

    GUI with "scrollable label"?

    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!

  • #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,987
    Thanks
    4
    Thanked 2,660 Times in 2,629 Posts
    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 :/).

  • #3
    New Coder
    Join Date
    Jul 2010
    Posts
    44
    Thanks
    1
    Thanked 0 Times in 0 Posts
    I'll try that, thank you!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •