Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » WindowBuilder » JFace close(Close a JFace application from a button)
JFace close [message #777475] Tue, 10 January 2012 10:14 Go to next message
Bill Brandley is currently offline Bill Brandley
Messages: 12
Registered: October 2011
Junior Member
I created a JFace application containing a "Close" button. In the "mouseUp" event, I placed:

Display.getCurrent().dispose();

I modified main() thusly:

if(Display.getCurrent() != null) {
Display.getCurrent().dispose();
}

Is this a reasonable way to clode a JFace application from a button?

Thanx,
Bill
Re: JFace close [message #777557 is a reply to message #777475] Tue, 10 January 2012 12:37 Go to previous messageGo to next message
Konstantin Scheglov is currently offline Konstantin Scheglov
Messages: 554
Registered: July 2009
Senior Member
window.close();


http://www.informit.com/guides/content.aspx?g=java&seqNum=92



Konstantin Scheglov,
Google, Inc.
Re: JFace close [message #777584 is a reply to message #777557] Tue, 10 January 2012 14:02 Go to previous message
Eric Clayberg is currently offline Eric Clayberg
Messages: 856
Registered: July 2009
Location: Boston, MA
Senior Member
BTW, general questions about JFace should be posted to the Eclipse JFace forum.

Likewise, general questions about SWT should be posted to the Eclipse SWT forum.
Previous Topic:Databinding for an Enumeration
Next Topic:DataBinding - Enumerations
Goto Forum:
  


Current Time: Thu Aug 21 18:05:12 EDT 2014

Powered by FUDForum. Page generated in 0.10829 seconds