sábado, 25 de febrero de 2012

Dialog


package AWT;

import java.awt.Dialog;
import java.awt.Frame;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;

public class DialogTest {

/**
* @param args
*/
public static void main(String[] args) {
Frame f=new Frame("Frame test");
f.setSize(200,150);
f.setVisible(true);

Dialog d=new Dialog(f);
d.setTitle("Dialog test");
d.setBounds(50,50,70,50);
d.setVisible(true);
        f.addWindowListener(new WindowAdapter(){
public void windowClosing(WindowEvent e){
System.exit(0);
}
});
}

}

No hay comentarios:

Publicar un comentario