Custom main frame close
2 posts
• Page 1 of 1
Custom main frame close
I won't close the application if x button was pressed. How is this possible?
- jvxdev
- Posts: 19
- Joined: Fri Mar 04, 2016 12:40 pm
Re: Custom main frame close
This depends on the UI implementation.
If you use Vaadin UI, it can't be done because JVx can't change the browser handling.
If you use Swing UI, it's easy because the launcher is the frame:
If you add a listener to the event, the default implementation will be completely ignored.
Don't forget to call:
in your listener, to close the frame, if needed.
If you use Vaadin UI, it can't be done because JVx can't change the browser handling.
If you use Swing UI, it's easy because the launcher is the frame:
- Code: Select all
getLauncher().eventWindowClosing().addListener(this, "doWindowClosing");
If you add a listener to the event, the default implementation will be completely ignored.
Don't forget to call:
- Code: Select all
getLauncher().dispose();
in your listener, to close the frame, if needed.
-
Support@SIB - Posts: 353
- Joined: Mon Sep 28, 2009 1:56 pm
2 posts
• Page 1 of 1