The AWT class in JMDL

Status
Not open for further replies.

Leonardo Vilela

Usenet Archive
Joined
Dec 30, 2001
Messages
1
Reaction score
0
I'm using a Frame to input data and, when I use the awt WindowListener whith a WindowClosing method in JMDL, in the runtime there's a exception that is not normal in Java, and are wroten in microstaion text window. If i use the method DgnKernel.exit, the Microstation close. How Can I close a frame in Jmdl whithout output text in Microstation text window?

Thanks
Leonardo Vilela
 
Leonardo ...

// This code may do what you want, provided 'this' extends a JFrame or // other frame that has a processWindowEvent method you can override

//File | Exit action performed
public void fileExit_actionPerformed (ActionEvent e) { try { System.exit (0); } catch (Exception exitException) { // If we caused an Exception in MicroStation, just // close this Frame. However, our classes will not // be unloaded from MicroStation's JVM this.dispose ; } }

//Overridden so we can exit on System Close
protected void processWindowEvent (WindowEvent e) {
super.processWindowEvent (e);
if (e.getID == WindowEvent.WINDOW_CLOSING) {
fileExit_actionPerformed (null);
}
}
 
Status
Not open for further replies.

Latest threads

Back
Top