import javax.microedition.lcdui.*;

class Canvas1 extends Canvas {

  public void paint (Graphics g) {

     // shows the width and height of the display on console
     System.out.println("Width " + getWidth());
     System.out.println("Height " + getHeight());

     // clean the display
     g.setGrayScale (255);
     g.fillRect (0, 0, getWidth (), getHeight ());

     g.setGrayScale (0);
     g.drawLine (20, 33, 170, 61);
     g.drawRect(40, 65, 60, 40);

     g.setColor(255, 0, 255);
     g.drawArc(10,120,50,50,0,360);

     g.setColor(0, 255, 255);
     g.fillRect(130, 110, 30, 40);
  }
}


