I write project in Java in NetBeans. I created a new project and didn't check to create main class, because I create all with drag and drop, make some buttons and events on them. Then, I created two JFrame classes: NewJFrame and NewJFrame1, in NewJFrame I a have a button in both frames. 
So, can you tell me how can I make event to open first frame by clicking on button in second frame, and to open second frame by clicking on button in first frame?
 
     
    