title: Convert Java AWT code to Android
body: <p>I developed code in Java using AWT.  Now I would like to use that code in Android. While I used that code in Android, error is showing at "graphics". Here is part of code.</p>
  
  <pre><code>public void fixBox(Graphics g,int x,int y,int w,int h,Color c)
      {
          g.setColor(c);
          g.fillRect(x,y,w,h);
      }
  </code></pre>
  
  <p>How to convert it to, and use it in, Android?</p>