Look at the tutorial for ideas on how to write GUI:
Trail: Creating a GUI With JFC/Swing (The Java™ Tutorials)