且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

单击JButton后关闭jFrame

更新时间:2023-12-02 11:58:28

假设你的按钮有一个actionListener,点击规则按钮后放入:

Assuming your button has an actionListener, after clicking the "rules button" put in:

      JFrame1.dispose();  //Remove JFrame 1
      JFrame2.setVisible(true) //Show other frame

然后尊重他们反对的反应

And then reverese them for the opposite reaction