package com.tutego.insel.ui.event;

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

public class CloseWindowWithInnerClass extends JFrame
{
  public CloseWindowWithInnerClass()
  {
    setSize( 400, 400 );

    addWindowListener( new WindowAdapter() {
      @Override public void windowClosing( WindowEvent e ) {
        System.exit( 0 );
      }
    } );
  }

  public static void main( String[] args )
  {
    new CloseWindowWithInnerClass().setVisible( true );
  }
}
