Table and TableViewer tutorial
Remus Stratulat 2006-10-13
Rich view
SWT offers the possibility of creating rich interfaces and one of the tools used to accomplish this is the table. The table is implemented in SWT by the org.eclipse.swt.widgets. Table class that can display data in a tree like structure or in a tabular form. The following image is showing this two variants used in Eclipse.

However, the best way to easily integrate a table in your application is by using a viewer, specifically the org.eclipse.jface.viewers.TableViewer. This class is a concrete viewer based on a SWT Table control. It harnesses the power of table and it provides structure in development. At first glance it seems hard to work with it but in reality is simple and straightforward. All the additional coding involved is to let the developer specify the particularities of his model.
But let's see the code...