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.drawLine(100,100,200,200);
        g.fillRect(0,0,getSize().width,getSize().height);*/


    }

    private void jbInit() throws Exception {
    }
}
