Skip to content
Search

Standard Widget Toolkit

lastmod 2018-08-17created 2014-01-0525 edits

The Standard Widget Toolkit (SWT) is the Java-based widget toolkit (Widget Toolkit) used by Eclipse. The toolkit was originally developed by IBM, but is now maintained by the Eclipse Foundation, which develops Eclipse. The toolkit is distributed under the Eclipse Public License.

SWT Packages

Template:org.eclipse.swt

SWT constants and error handling support.

Template:org.eclipse.swt.accessibility

SWT Accessibility.

Template:org.eclipse.swt.awt

SWT AWT embedding support.

Template:org.eclipse.swt.browser

SWT Browser widget.

Template:org.eclipse.swt.custom

SWT Custom widgets.

Template:org.eclipse.swt.dnd

SWT Drag and Drop support.

Template:org.eclipse.swt.events

SWT typed listener support.

Template:org.eclipse.swt.graphics

SWT graphics classes.

Template:org.eclipse.swt.layout

SWT layout classes.

Template:org.eclipse.swt.ole.win32

SWT Win32 OLE implementation classes.

Template:org.eclipse.swt.opengl

SWT OpenGL support.

Template:org.eclipse.swt.printing

SWT Printing support classes.

Template:org.eclipse.swt.program

SWT Program support class.

Template:org.eclipse.swt.widgets

SWT widget public API classes.

SWT Tutorial Index

Troubleshooting

A collection of solutions to SWT-related problems.

SWTException: Invalid thread access

As on Android, the UI must be updated from the UI thread. Otherwise, the following message is printed.

org.eclipse.swt.SWTException: Invalid thread access

To fix this, apply the update code as shown below.

Display.getDefault().asyncExec(new Runnable() {
    @Override
    public void run() {
        // update...
    }
});

Libraries

  • KTable: KTable is a custom SWT table widget that provides a flexible grid of cells to display data.
  • Agile Grid: Agile grid is a complete new implementation of custom table for Java SWT applications, which uses the structure and some code fragments from the JFace table viewer.
  • swtgraph: The SWT Graph project is a collection of custom-draw canvas developed to solve some user interface aspects when you need to represent advanced data interactively.
  • NatTable: NatTable is a custom table/grid widget which based on the SWT library.
  • RCP Toolbox: A UI input validation framework; lightweight yet powerful. A number of custom widgets, composites and other helpful classes to be used when developing Eclipse SWT, JFace or RCP applications.
  • Nebula Project: Nebula is a place where different Eclipse-Projects and Independent developers collaborate on building Custom SWT widgets and reuseable UI-Components useable in UI-Applications built using SWT, JFace and RAP.
  • PFGrid-Toolkit SWT: Empower your UI with our Winforms and SWT controls!

Favorite site

Guide

Tutorial

References


  1. Native_2d_rendering_in_an_eclipse_view_using_opengl.pdf ↩

  2. Eclipse_Corner_Article_-_Understanding_Layouts_in_SWT.pdf ↩

  3. Creating_Your_Own_Widgets_using_SWT.pdf ↩

  4. Wiki-eclipse-swt-event-process.pdf ↩

  5. SWT_-_Tutorial.pdf ↩