title: Switching Panels in Swing
body: <p>I have a Swing application using Card Layout which basically changes the displayed panel depending on what the user selects from a drop-down menu.</p>
  
  <p>One of my panels has a form. I would need for when the submit buton is pressed for all the inputs to be collected and the Panel to be switched to another one. (This second panel is defined in a separate class) I would also need for all the input to be somehow passed to a method in the new panel.</p>
  
  <p>Any suggestions?
  Dario</p>