sábado, 20 de agosto de 2011

public class sketch_editor4 extends PApplet {

public void setup() {
size(200, 200);
}


public void draw() {

if(mouseX < 70) {
cursor(CROSS);
} else {
cursor(HAND);

}
}

public void mousePressed(){
background(190);
ellipse(mouseX, mouseY, mouseX, mouseY);
fill(255);
}
static public void main(String args[]) {
PApplet.main(new String[] { "--bgcolor=#F0F0F0", "sketch_editor4" });
}
}

viernes, 12 de agosto de 2011

primer programa

saludo.html

Página Web con applet

code="saludo.class" width=300 height=200>


Import java.awt.*;


Import java.applet.Applet;

public class saludo extends Applet {

public void paint (Graphics g);

g.drawString("hola", 50, 50);

g.drawString("Muy bien", 50, 100);

}

}
code="amor.class" width=300 height=200>