Other comments:
Why build your interface in the main() method? Use the interface's constructor.
Overriding the paint() method is not recommended. Review Oracle's "Custom Painting" tutorial.
In general, this is an awkward design that is likely being driven by you trying to make things work within the limited context of what you already know. Instead of making it up as you go, find a number of decent tutorials on writing graphical interfaces - the Oracle Swing tutorials are an okay place to start - and do them all. Come here with your work to ask for pointers and anytime you need help.