module snippet38; /* * Table example snippet: create a table (columns, headers, lines) * * For a list of all SWT example snippets see * http://www.eclipse.org/swt/snippets/ */ import dwt.DWT; import dwt.widgets.Display; import dwt.widgets.Shell; import dwt.widgets.Table; import dwt.widgets.TableItem; import dwt.widgets.TableColumn; public class Snippet38 { public static void main () { Display display = new Display (); Shell shell = new Shell (display); Table table = new Table (shell, DWT.MULTI | DWT.BORDER | DWT.FULL_SELECTION ); table.setLinesVisible (true); table.setHeaderVisible (true); char[][] titles = [" "[], "C", "!", "Description", "Resource", "In Folder", "Location" ]; for (int i=0; i