title: AWT getPeer returns null
body: <p>I am new in AWT and I'm facing a problem. Here is the code sample of my function <code>func(Container container)</code>, where <code>container != null</code>:</p>
  
  <pre><code>Canvas embedder = new Canvas();
  embedder.setBackground(...);
  embedder.setPreferredSize(...);
  container.add(embedder);
  container.setVisible(true);
  </code></pre>
  
  <p>Then I am trying to get <code>frameWindow</code>, long
  and my first action is</p>
  
  <pre><code>ComponentPeer peer = embedder.getPeer();
  </code></pre>
  
  <p>and I am getting <code>peer == null</code></p>
  
  <p>Please, tell me why this may happen?</p>