ejrcicio 8
Codigo:
Codigo:
import java.awt.event.*;
public class Ventana8 extends Frame{
public Button boton;
public Ventana8(String titulo, int x, int y){
super(titulo);
setSize(x,y);
setVisible(true);
setLayout(new FlowLayout()); // gestor de diseno
boton = new Button("Un Boton 8" );
this.add(boton);
}
public static void main (String[] args){
Ventana8 miVentana=new Ventana8("una ventana", 600,400);
miVentana.addWindowListener(new WindowAdapter(){
public void windowClosing(WindowEvent e){
System.exit(0);
}
});
}
}
No hay comentarios:
Publicar un comentario