If there are two frame, frame1,frame2,frame1 add a button to implement the jump. Frame1 code is as follows import java.awt.event.ActionEvent;
Import Java.awt.event.ActionListener;
Import Javax.swing.JButton;
Import Javax.swing.JFrame;
public class Frame1 extends JFrame implements actionlistener{/** * @param args/private JButton JB;
Public frame1 () {this.setsize (300, 200);
This.setlocation (300, 400);
Jb=new JButton ("Jump");
This.add (JB);
Jb.addactionlistener (this);/Join Event Listener this.setvisible (TRUE); public static void Main (string[] args) {//TODO auto-generated method stub frame1 frame=new fram
E1 (); @Override public void actionperformed (ActionEvent e) {//TODO auto-generated method stub if (e.g
Etsource () ==jb) {this.dispose ()//click Button frame1 destroy, new one frame2 new Frame2 ();
}} frame2 is a simple interface import Javax.swing.JButton; Import Javax.swing.JFrame; public class Frame2 extends jframe{/** * @param args/Public frame2 () {this.se
Tsize (300, 200);
This.setlocation (300, 400);
This.setvisible (TRUE); public static void Main (string[] args) {//TODO auto-generated method stub frame2 frame=new frame
2 (); }
}