how to close a frame when button clicks

后端 未结 3 858
攒了一身酷
攒了一身酷 2021-01-24 08:52

I am new to Java Swing. I am creating a frame with some components.

I have to close the frame and open another frame when the button is clicked. I had tried setVis

3条回答
  •  说谎
    说谎 (楼主)
    2021-01-24 09:44

    Did you try calling dispose() on the frame? I think that may be what you're looking for.

提交回复
热议问题