title: Java: Repaint artifacts with alpha painting
body: <p>I just had a problem with artifacts at a JPanel which contains transparent parts.
  My JPanel overrides the paintComponent() method:</p>
  
  <pre><code>protected void paintComponent(Graphics g) {
      g2d = (Graphics2D) g;
      drawMyAplhaImage(g2d);
  }
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/fUK18.png" alt="Repaint Artifacts"></p>
  
  <p>As you can see, the Image drawn on the JPanel is a bit smaller than the JPanel itself.</p>