I have gotten it right. i had to put all the TransferFramePanel code into TransferClass Constructor and extends JFrame, then initialize TransferClass from MyClass action.
I want to exit MyClass window after TransferClass window is visible?
I use System.exit(1); but the whole Application was closed, that is MyClass and TransferClass window was closed.
what code can i use to close only MyClass window? am i little bit lost in the bush!!!