比如说现在有个Button B1还有一个编写新窗口的java文件(next.java)对B1设置点击事件B1.addMouseListener(new MouseListener(){public void mouseClicked(MouseEvent e) {java.main(null);}}