title: draw buffered image ontop of another buffered image
body: <p>my goal is to draw some bufferedimage onto another. then all this stuff draw onto some other bufferedimage and so on. And finally draw this on top of a panel. 
  For now i'm trying to draw bufferedimage onto panel and nothing works. My bufferedimage looks completely white:</p>
  
  <pre><code>public class Main2 {
      public static void main(String[] args) {
          JFrame frame = new JFrame("asdf");
          final JPanel panel = (JPanel) frame.getContentPane();
          frame.setSize(500,500);
          frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          frame.setVisible(true);
          panel.addMouseListener(new MouseAdapter() {
              @Override
              public void mouseClicked(MouseEvent e) {
                  somepaint(panel);
              }
          });
      }
  
      private static void somepaint(JPanel panel) {
          BufferedImage image = new BufferedImage(200,200,BufferedImage.TYPE_INT_ARGB);
          image.getGraphics().setColor(Color.red);
          image.getGraphics().fillRect(0, 0, 200, 200);
  
          Graphics2D graphics = (Graphics2D) panel.getGraphics();
          graphics.setColor(Color.magenta);
          graphics.fillRect(0, 0, 500, 500);
          graphics.drawImage(image, null, 0, 0); // draws white square instead of red one
      }
  }
  </code></pre>
  
  <p>thanks</p>