import javax.microedition.lcdui.*;
class Canvas6 extends Canvas {

Image image;
public Canvas6()
{
  try{
    image = Image.createImage(60, 50);
    Graphics g = image.getGraphics();
    g.setColor(0, 0, 255);
    g.fillRect(0, 0, image.getWidth()-1, image.getHeight()-1);
    g.setColor(255, 0, 0);
    g.fillArc(24,6, 12, 36, 0, 360);
    g.fillArc(8,18, 44, 10, 0, 360);

  }catch(Exception e){
      System.out.println("** Error, creating image");
  }
}
public void paint (Graphics g) {
   // clean the display
   g.setGrayScale (255);
   g.fillRect (0, 0, getWidth (), getHeight ());

   if(image != null)
     g.drawImage(image, getWidth()/2, 10, Graphics.HCENTER|Graphics.TOP);
}
}

