i found it!!!!
just declear the frame outside the stub of the jButton, right at the beginning of
public class Frame1 extends JFrame{......
that way, when i press the jbutton, it will not create a new frame, but will reshow the same frame already created.
|