How to set the previous jframe visible when current jframe is disposed
问题 I am making a Java gui project and it consists of two frames. The problem is that when I call the secondframe from the firstframe, I have set it such that the firstframe visibility is set to false. The problem is how do I make the firstframe visible again by using a button from the second frame. should i ditch this method and create a new jpanel instead??? Does jpanel have similar capabilities as jframe? 回答1: Consider using CardLayout . This way you can switch via multiple UIs without needing