title: Java - Solving WindowPeer warning
body: <p>When I compile my below java code, </p>
  
  <pre><code>Window w = c instanceof Window ? (Window) c : SwingUtilities.getWindowAncestor(c);
  WindowPeer peer = (WindowPeer) w.getPeer();
  </code></pre>
  
  <p>I'm getting below warning message:</p>
  
  <pre><code>warning: WindowPeer is internal proprietary API and may be removed in a future release
  </code></pre>
  
  <p>Any idea how to solve this issue?
  I'm using JDK 1.6 and I tried 1.7 also.</p>