import org.eclipse.swt.*; import org.eclipse.swt.graphics.*; import org.eclipse.swt.layout.*; import org.eclipse.swt.widgets.*; /** * @author Thomas Singer */ public class TableColumnsClientAreaTest { public static void main(String[] args) { final Display display = new Display(); final Shell shell = new Shell(display); shell.setLayout(new FillLayout()); final Table table = new Table(shell, SWT.MULTI); table.setHeaderVisible(true); final TableColumn column = new TableColumn(table, SWT.LEFT); column.setText("Column"); new TableItem(table, SWT.NONE).setText("row 0"); table.addListener(SWT.Resize, event -> { final Rectangle clientArea = table.getClientArea(); System.out.println("clientArea = " + clientArea); column.setWidth(clientArea.width); }); shell.setSize(400, 300); shell.open(); while (!shell.isDisposed()) { if (!display.readAndDispatch()) { display.sleep(); } } display.dispose(); } }