Java swing application, close one window and open another when button is clicked

前端 未结 7 1963
离开以前
离开以前 2020-12-03 07:56

I have a netbeans Java application that should display a JFrame (class StartUpWindow extends JFrame) with some options when the application is launched, then the user clicks

7条回答
  •  盖世英雄少女心
    2020-12-03 08:24

    Use this.dispose for current window to close and next_window.setVisible(true) to show next window behind button property ActionPerformed , Example is shown below in pic for your help.

提交回复
热议问题