Ok so, whilst my code works. I am beginning to question the logic of my code, and how I can improve it, before adding yet more code.
In short, I am creating a JFrame using Borderlayout as the layout manager. I have added a JPanel, which then has buttons, textfields etc added. Once the user has done everything they need to do, I get the user to click "ok" and I basically call the dispose() method.
I then paint a new JFrame, and do exactly the same thing repeatedly.
Whilst this is easy to code, and I'm a self taught newb, I am concerned about my lack of code re-use and I am convinced I should only be using one JFrame.
My main question is this : Is the dispose() method destroying the window, or just hiding it?
Any advice on this topic, would be much appreciated :)