Documentation and Tutorials

JavaDoc for SWT, JFace and Eclipse

SWT Homepage

SWT Articles

Online SWT Book

SWT Programmer's Guide

Understanding Layouts in SWT
When writing applications in SWT, you may need to use layouts to give your windows a specific look. A layout controls the position and size of children in a Composite. Layout classes are subclasses of the abstract class Layout. This article shows you how to work with standard layouts, and write your own custom layout class.

Getting Your Feet Wet with the SWT StyledText Widget
The StyledText widget is a customizable widget that can be used to display and edit text with different colors and font styles. This article presents an overview of the concepts, issues, and rules that you should be aware of when using the StyledText? widget.

Custom Drawing Table and Tree Items
Populating a table or tree widget involves creating items and setting their attributes (eg.- texts, images, etc.), after which the table or tree takes responsibility for displaying the items. This approach makes item creation straightforward and visually consistent. As of Eclipse 3.2, clients of Table and Tree can now custom draw their items, enabling a wide range of potential visual appearances. This article explores the custom draw mechanism for Table and Tree.

JFace Articles

Using the Eclipse GUI outside the Eclipse Workbench, using JFace and SWT in stand-alone mode. Building a simple file explorer application: Part 1 Part 2 Part 3

A gentle introduction to SWT and JFace: How to use ToolBars and SashForms
This installment of A gentle introduction to SWT and JFace expands on what you've learned about creating applications using Java technology, Eclipse, and the SWT and JFace libraries. This installment shows you how to use ToolBars, CoolBars, Trays, SashForms, Links, and other controls, as well as several dialog types.

A gentle introduction to SWT and JFace: How to use TabFolder, Canvas, and StyledText
This installment of A gentle introduction to SWT and JFace expands on what you've learned about creating applications using Java technology, Eclipse, and the SWT and JFace libraries. Find out how to use tabular tree, canvas, styled text, slider, spinner, scale and other controls, as well as stack layouts.

A gentle introduction to SWT and JFace: How to use combo, list, table, and tree controls
This installment of A gentle introduction to SWT and JFace expands on what you've learned about creating simple Standard Widget Toolkit (SWT) applications using Java technology, Eclipse, and the SWT and JFace libraries. This installment shows you how to use combo, list, table, and tree controls, as well as form layouts and reusable helper methods.

A gentle introduction to SWT and JFace: How to create a simple SWT application
In this first article of A gentle introduction to SWT and JFace, find out how to create a simple Standard Widget Toolkit (SWT) application using Java, Eclipse, and the SWT and JFace libraries. Also learn how to create simple SWT GUIs using basic controls and layouts.

Field Decorations with JFace

Text Field Content Proposals in JFace

How to Correctly and Uniformly Use Progress Monitors

How to use the JFace Tree Viewer
The goal of this article is to teach you how to use TreeViewers in your Eclipse plug-ins or stand-alone JFace/SWT applications. We’ll start with a simple example and progressively add functionality.

Building and delivering a table editor with SWT/JFace
The JFace API provides several classes that can be used to build editable table views. In this article, we present a fairly extensive example that exercises the JFace and SWT classes needed to implement a table with cell editors for check-boxes, free text and combo-boxes. We also show how to package and deliver the classes into a stand-alone (non-Eclipse) Java application.

Eclipse Jobs

On the Job: The Eclipse Jobs API
This article looks at the new Jobs API available as part of Eclipse 3.0. It describes the main portions of the Jobs API and the use of scheduling rules. It also describes some changes to Eclipse resource management including how the Resources plug-in integrates with the new API. Finally, it describes some new UI functionality that has been added to provide feedback to users about jobs that are run in the background.

JFace.Text

Folding in Eclipse Text Editors
Starting with release 3.0, Eclipse allows folding in its text editor. In this article, I explain the new projection infrastructure introduced in the JFace Text framework and show how to extend the XML Editor example provided with Eclipse to allow folding of text.

Building an Eclipse Text Editor with JFace Text

FAQ How do I write an editor for my own language?