home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Java 1.2 How-To
/
JavaHowTo.iso
/
3rdParty
/
Gamelication
/
com
/
next
/
gt
/
RCS
/
WindowDestroyer.java,v
< prev
Wrap
Text File
|
1998-04-15
|
940b
|
69 lines
head 1.2;
access;
symbols;
locks; strict;
comment @# @;
1.2
date 98.04.13.23.35.56; author jgh8962; state Exp;
branches;
next 1.1;
1.1
date 98.04.10.17.53.01; author jgh8962; state Exp;
branches;
next ;
desc
@@
1.2
log
@*** empty log message ***
@
text
@package com.next.gt;
import java.awt.*;
import java.awt.event.*;
/**
Utility class whose objects exit when the attached window is closed.
*/
public class WindowDestroyer extends WindowAdapter {
private Gamelication owner;
private Frame mainScreen;
public WindowDestroyer( Frame gamelicationFrame , Gamelication owner ) {
mainScreen = gamelicationFrame;
this.owner = owner;
}
public void windowClosing(WindowEvent e) {
if( e.getWindow() == mainScreen ) {
owner.stop();
System.exit(0) ;
}
else
e.getWindow().dispose();
}
}
@
1.1
log
@Initial revision
@
text
@d20 6
a25 2
owner.stop();
System.exit(0) ;
@