Please see the link in my signature on asking smart questions before you post again.

In the mean time, check out the swing tutorial: Trail: Creating a GUI With JFC/Swing (The Java™ Tutorials)