There are quite some java open source ftp clients. Check how they implement the same problem you have.
In your exercise, do you want to focus on the ftp functionality, or are you focusing on GUI? In the second case, it might be easier to use an ftp library in stead of starting from scratch using the core java libraries.
Good luck, Jan