See,2 frames are being created because u have created 2 objects-app and jftMainFrame