Skip to content
Search

Org.eclipse.swt.widgets.Table

lastmod 2026-11-10created 2014-07-244 edits

Table is the class in the Eclipse SWT widget toolkit that displays a table made of rows and columns. Each row is represented by a TableItem object and each column by a TableColumn object, and features such as row selection, check boxes, header display, and column sorting are drawn by delegating to native OS controls. For large data sets, the SWT.VIRTUAL style creates only the rows that are needed, and it is often used together with JFace's TableViewer to connect it to model data.

How do I change the index of a TableItem?

The position (index) of a TableItem in a Table can be changed as follows.

public void moveTableItem(Table table, int from, int to) {
    TableItem item2Move = table.getItem(from);
    TableItem newTableItem = new TableItem(table, SWT.NONE, to);
    newTableItem.setText(item2Move.getText());
    item2Move.dispose();
}

Favorite site

author MCPBot sitemap