package traduccion;
import java.awt.*;
import java.awt.Canvas;
import java.awt.Graphics;
public class MiCanvas extends Canvas {
    public static int width=300;
    public static int height=200;
   final Color[] colores={Color.red,Color.GREEN,Color.blue};
    int indice;
    Graphics g;
    public MiCanvas() {
        setBackground (colores[1]);
        paint(g);
        try {
            jbInit();
        } catch (Exception ex) {
            ex.printStackTrace();
        }

    }
    void setColor(int indice){
        this.indice=indice;
        repaint();
    }
    public Dimension setPreferredSize(){
     return new Dimension(400, 300);
  }

    public void paint (Graphics g){
        g.create(3,2,30,50);


    }

    private void jbInit() throws Exception {
    }
}
