title: Gridlayout button click then load under the buttons a form Java
body: <p>I really didn't now how to form the question i have a gridlayout with 4 buttons. When the user press Add module i want under the buttons a form instead of a new windows if this is possible.</p>
  
  <pre><code>frame = new JFrame("ModuleViewer");
     makeMenu(frame);
  
     Container contentPane = frame.getContentPane();
  
      // Specify the layout manager with nice spacing
     contentPane.setLayout(new GridLayout(0, 2));
  
     addModule = new JButton("Toevoegen Module");
     contentPane.add(addModule);
  
     overview = new JButton("Overzicht Modules");
     contentPane.add(overview);
  
     addSchoolweeks = new JButton("Aapassen schoolweken");
     contentPane.add(addSchoolweeks);
  
     weekheavy = new JButton("Weekbelasting");
     contentPane.add(weekheavy);
  
     frame.pack();
  
     Dimension d = Toolkit.getDefaultToolkit().getScreenSize();
     frame.setLocation(d.width/2 - frame.getWidth()/2, d.height/2 - frame.getHeight()/2);
     frame.setVisible(true);
  </code></pre>
  
  <p>I know that i first need to add een action method for the buttons i know how to do that so that isn't important. I only want to know how i could create a layout under the buttons so when a user clicks the layout will be draw.</p>