title: change JPanel after clicking on a button
body: <p>I'm building simple GUI for my app. I have couple of JPanels. I want to display them depending on action that was performed by clicking on a JButton. How can I disable one JPanel and enable another one ?</p>
  
  <p>Couple of details. I have a class with JFrame where I'm building starting gui. Where I have buttons and some text. Clicking on one of the buttons should change the view in this JFrame</p>
  
  <p>my button definition</p>
  
  <pre><code>    JButton btnStart = new JButton("Start");
      btnStart.addActionListener(new ActionListener() {
          public void actionPerformed(ActionEvent e) {
  
          }
      });
      btnStart.setBounds(10, 11, 110, 23);
      contentPane.add(btnStart);
  </code></pre>
  
  <p>// edit</p>
  
  <p>I've found the problem. buttons were in static method</p>