Re: SingleFrameApplication : Exit Menu vs Close Window button
necronet <[email protected]> Sun, 12 Oct 2008 00:48:41 -0700 (PDT)
| Newsgroups | gmane.comp.java.netbeans.user-interface |
|---|---|
| Message-ID | <[email protected]> |
I had the same problem. Solve it like this:
IPManagerApp.getApplication().addExitListener(new ExitListener(){
public boolean canExit(EventObject arg0) {
return exitMethod();
}
public void willExit(EventObject arg0) {
}
});
IPManagerApp: is the class that inherits from SingleFrameApplication.
You call the getApplication method and addExitListener whos behaivor is
similar to window closing hopefully this help you
Bob G. wrote:
>
> Hello,
>
> I am starting to use jdesktop API with NetBean 6.01.
>
> I am building a simple SingleFrameApplication (From the Wizzard). My main
> view extend the class FrameView
>
> The auto generated Exit Menu item close my application properly (closing
> my Spring Context properly).
> But when I close it with the Close the windows with the top Button, the
> behaviour is different. The windows disappear but the JVM does not exit
> properly (Spring context does not close properly).
>
> How can I have access to the Close event from the JFrame under the
> FrameView object?
>
> Is there a reason why the API is not published anywhere?
>
>
>
>
>
>
>
--
View this message in context: http://www.nabble.com/SingleFrameApplication-%3A-Exit-Menu-vs-Close-Window-button-tp16025542p19939405.html
Sent from the Netbeans Project UI Design and Discussion (not for user help) mailing list archive at Nabble.com.