Help loading form please



I am a newbie. In fact I am in school working on my Java project. Could
someone please explain to me how to load a form from another form. I have a
main form and from that form I want to show another form called view cart.
I need to load the swing form when they press the view cart button, but it
says I can not call invokeandwait from an event dispatcher....Help.


.