Ganymede – New SWT API

June 27, 2008

This week Ganymede, which had many new features and improvements, was released.

The effort of Eclipse foundation for creating a platform, which helps in creating application ranging from Enterprise class to Desktop applications, has to be really appreciated.

In this release, I found a couple of new API in SWT really interesting.

The first one of these enables to make a window fullscreen. We just need to set a flag on the Shell, and it becomes fullscreen.
The flag has to be set using the method : Shell.fullScreen( boolean )
Use Shell.fullScreen( true ), to make the window fullscreen.

There is another method added to the Shell class, which enables to create transparent windows.
This is Shell.setAlpha( int )
The alpha value that need to be set should be passed to this method. The alpha value ranges from 0-255. By default the alpha value is set to 255 and as we reduce the value of it, the window becomes transparent. A getter for the alpha value is also available.

Another new method is added to the Control class, which enables to create custom shaped controls.
This is Control.setRegion( Region ).
Create a region of any shape and set it onto the control. An example showing the usage of this API is here.


Create your own website, free on WordPress.com.Create your own website.
Start free