title: Need help using 'this' - cannot use in a static context
body: <p>I understand that static methods must be called but not-static methods must have an instance made. I am trying to make a simple 2D game. I want all my graphics to appear in one window not several different windows for each class which is what was happening. So I decided to make a paintGraphics class with a static updateBackBuffer method that will add an image to a graphics2D variable (named g2d). I tried this code but i got an error that I cannot use this in a static context, how can I get around this?:</p>
  
  <pre><code>public static void updateBuffer(Image image, int XPos , int YPos , int Height , int Width ,   int Rotation, AffineTransform trans) {
      trans.translate(XPos,YPos);
      trans.rotate(Rotation);      //More lines will probably be more lines totransform the shape more as the game gets more advanced
      g2d.drawImage(image,trans,this);    
  }
  </code></pre>