Codigo:
import java.awt.event.*;
public class Ventana7 extends Frame {
public Ventana7 (String titulo, int x, int y){
super(titulo);
setSize(x,y);
//JMenu();
setVisible(true);
}
public void muestraDialogoFichero(){
FileDialog dialogo= new FileDialog(this);
dialogo.setVisible(true);
}
public static void main (String[] args){
Ventana7 miVentana=new Ventana7("una ventana", 600,400);
miVentana.muestraDialogoFichero();
miVentana.addWindowListener(new WindowAdapter(){
public void windowClosing(WindowEvent e){
System.exit(0);
}
});
}
}
No hay comentarios:
Publicar un comentario