I currently have an application with a single window builder and multiple JFrames. When i move from one jframe to another i use the following code
contentPane.setVisible(false);
EditAccountDetails editAccountDetails = new EditAccountDetails("admin");
editAccountDetails.setVisible(true);
This creates a new jframe but this doesnt close the old one. This doesnt happen when i move from my windowbuilder to a jframe, because i can close the window builder frame:
frame.dispose();
AdminDashboard adminDashboard = new AdminDashboard();
adminDashboard.setVisible(true);
I cant close the jframe in the same way, and im assuming i shouldnt have multiple instances of a windowbuilder. How do i fix this issue?