title: A individual class for each Card in java swing CardLayout
body: <p>For architecture and design purposes I would like to design my GUI with a class for each card in a Java Swing CardLayout.  and then have a mainapp that builds the GUI.  I am having trouble doing this right now.  </p>
  
  <p>I would like to example have a class for the main menu with all the button locations etc.  and then just instantiate that card and add it to the layout in another class.  Does anyone know how to achieve this?</p>