Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Nebula » Close Window Button
Close Window Button [message #588880] Tue, 04 March 2008 02:04
Eclipse UserFriend
Originally posted by:

I have made a "close" button. My close button is supposed to close the
window and open another one. How can I do this? Here is my code:
btnExit.addSelectionListener(new SelectionAdapter() {
	public void widgetSelected(final SelectionEvent arg0)
shell.addDisposeListener(new DisposeListener() {
	public void widgetDisposed(final DisposeEvent arg0) {

private void doClose() {
	new MainWindow();

When I use the "X" button in the window's top-right corner, the window
closes properly and everything is good. However, when I close the window
using my Close button, the window does not close properly. I'm assuming
it's because I call new MainWindow() after shell.dispose(). But if I call
new MainWindow() before shell.dispose() my window will never close.

Any help?
Previous Topic:Close Window Button
Next Topic:Re: Need a multi-column list widget for SWT
Goto Forum:

Current Time: Mon Jun 25 04:31:17 GMT 2018

Powered by FUDForum. Page generated in 0.02226 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top