package tutorialJava.capitulo5.ej07_InterfaceWindowListener;

import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.awt.event.WindowListener;

import javax.swing.JFrame;

public class Principal {

	
	
	public static void main(String[] args) {
		
		JFrame ventana = new JFrame("Título de la ventana");
		ventana.setBounds(0, 0, 800, 600);
		ventana.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);

		ventana.addWindowListener(new WindowAdapter() {

			@Override
			public void windowClosing(WindowEvent e) {
				super.windowClosing(e);
			}});
		
		ventana.setVisible(true);

	}

}







