title: getcontentpane method in JFrame class
body: <p>What is the use of <code>getContentPane</code> method in <code>JFrame class</code>? I googled it but I cant find appropriate answer.</p>
  
  <pre><code>class MainFrame extends JFrame {
  
      public MainFrame(String title) {
          super(title);
  
          // Set layout manager
          setLayout(new BorderLayout());
  
          // Create Swing component
           JTextArea textArea = new JTextArea();
          JButton button = new JButton("Click me!");
  
          // Add Swing components to content pane
          Container c = getContentPane();
  
          c.add(textArea, BorderLayout.CENTER);
          c.add(button, BorderLayout.SOUTH);
  
          JButton button1 = new JButton("Click me again!");
          add(button1,BorderLayout.NORTH);
          button.addActionListener(new ActionListener() {
  
              @Override
              public void actionPerformed(ActionEvent e) {
                  textArea.append("Hello\n");
              }
  
          });
          button1.addActionListener(new ActionListener() {
  
              @Override
              public void actionPerformed(ActionEvent e) {
                  textArea.append("Hello\n");
              }
  
          });
  
      }
  }
  </code></pre>