title: Java Swing design
body: <p>I have a question regarding coding a Swing UI. If I want to make a software with some option e.g. on the first Frame I have three buttons (New, Option, Exit).</p>
  
  <p>Now if a user clicks the new button, I want to change the entire content in the Frame to something else. I know I have to use <code>addActionListener</code> to that button. But my question is how to change the contents in the frame. Creating new Frames and then use <code>setVisible()</code> isn't an option for me. </p>
  
  <p>And to use <code>frame.remove()</code> all the objects seems awkward if it is several things that needs to be removed. Or is it the right way?</p>