Ventana_1.java_



import java.awt.*;
import javax.swing.JFrame;
import java.awt.event.*;

// Prototipo de una aplicación de ventana

// 1.-	Se crea la clase que extienda a la clase Frame, JFrame o Window
public class Ventana extends JFrame
{
	Letrero PANEL_ANIM;

	public Ventana ()
	{
		this.getContentPane().setLayout(null);	// Contenedor nulo
		this.setTitle("Tópicos de la animación");	// Titulo de la ventana
		this.setResizable(false);			// No es redimensionable
		this.setLocation(100, 100);			// Posicion desde la esquina superior izquierda del monitor
		this.setSize(new Dimension(600, 350));	// Dimensiones

		PANEL_ANIM = new MOV();
		this.getContentPane().add(PANEL_ANIM);
		PANEL_ANIM.setBounds(100, 50, 400, 250);
		PANEL_ANIM.start();

		// 2.-	Se muestra la ventana
		this.show();
	}

	public static void main(String R[])
	{
		new Ventana();
	}

	// 3.-	Captura del evento "cerrar ventana"
	protected void processWindowEvent(WindowEvent e)
	{
		super.processWindowEvent(e);
		if (e.getID() == WindowEvent.WINDOW_CLOSING)
		{
			System.exit(0);
		}
	}
}