title: Java GUI: about getContentPane( ) method and content
body: <p>In this piece of code: </p>
  
  <pre><code>JLabel emptyLabel = new JLabel("");
  emptyLabel.setPreferredSize(new Dimension(175, 100));
  frame.getContentPane().add(emptyLabel, BorderLayout.CENTER);
  </code></pre>
  
  <p>I can see it makes a new label and adds it to the <code>JFrame</code> object <code>frame</code>. 
  But I want to understand what does <code>getContentPane()</code> do, and why do I need it? </p>
  
  <p>I read <a href="http://docs.oracle.com/javase/6/docs/api/javax/swing/JFrame.html#getContentPane()">this API</a> but I still didn't understand.</p>