title: Blitting in Java
body: <p>I do not know java (usually write in c)</p>
  
  <p>How can I do efficiently some way of blitting 
  pixel array content onto a window in java? </p>
  
  <p>I need (in loop) <code>blit pixels[][]</code> onto a window</p>
  
  <p>I could use something like</p>
  
  <pre><code> pixels[][] -&gt; MemoryImageSource -&gt; Image -&gt; drawImage 
  </code></pre>
  
  <p>but creating and deleting  <code>MemoryImageSource</code> and <code>Image</code> 
  in every frame seems strange to me - how it can be
  done simply and reasonably efficiently? Could someone
  give a code example, tnx</p>