Ver Mensaje Individual
  #3 (permalink)  
Antiguo 09/08/2008, 12:43
txiti
 
Fecha de Ingreso: junio-2008
Mensajes: 168
Antigüedad: 15 años, 10 meses
Puntos: 0
Respuesta: El primer applet

Y no hay posibilidad de hacer algo? esq yo lo ejecuto y nada!y necesito imprimir rectas tengo el cofigo echo y no tira!
código:
public class Dibujar extends Applet{
public Dibujar() {
}
/* public void paint( int x1,int y1,int x2,int y2){
// Pinta el mensaje en la posición indicada
// this.getGraphics().setColor(Color.yellow);
this.getGraphics().drawLine(x1,y1,x2, y2 );
//g.drawString( "Hola Mundo!",25,25 );
}*/

public void init() {
System.out.println("Inicio...");
}

public void paint(int x1,int y1,int x2,int y2) {
this.getGraphics().setColor(Color.BLACK);
this.getGraphics().drawLine(x1,y1,x2, y2 );
}


public void paint(Graphics g) {
this.paint(0, 0, this.getWidth(), this.getHeight());
this.paint(0, this.getHeight(), this.getWidth(), 0);
}


}