and not on the window
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@194657
13f79535-47bb-0310-9956-
ffa450edef68
import javax.swing.UIManager;
import java.awt.*;
+import java.awt.event.WindowAdapter;
+import java.awt.event.WindowEvent;
// SAX
import org.xml.sax.XMLReader;
Translator res) {
PreviewDialog frame = new PreviewDialog(renderer, res);
frame.validate();
+ frame.addWindowListener(new WindowAdapter() {
+ public void windowClosed(WindowEvent we) {
+ System.exit(0);
+ }
+ });
// center window
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
}*/
}
- public void dispose() {
- System.exit(0);
- }
-
} // class PreviewDialog