Hi, I want to create a table viewer with some columns. I created a table viewer by swt designer. Then I added columns and column names by code. However, I couldn't find those columns in design mode and run time. Following is my source (including code generated by swt designer). Please help me to fix this problem. Thanks!
final TableViewer tableViewer = new TableViewer(shell, SWT.BORDER);
final Table table = tableViewer.getTable();
table.setLinesVisible(true);
table.setHeaderVisible(true);
table.setBounds(32, 28, 400, 100);
TableLayout layout = new TableLayout();
table.setLayout(layout);
layout.addColumnData(new ColumnWeightData(50));
new TableColumn(table, SWT.NONE).setText("Flight ID");
layout.addColumnData(new ColumnWeightData(50));
new TableColumn(table, SWT.NONE).setText("Airplane ID");
layout.addColumnData(new ColumnWeightData(50));
new TableColumn(table, SWT.NONE).setText("Seat number");
layout.addColumnData(new ColumnWeightData(50));
new TableColumn(table, SWT.NONE).setText("Airplane type");
layout.addColumnData(new ColumnWeightData(50));
new TableColumn(table, SWT.NONE).setText("Departure date");
layout.addColumnData(new ColumnWeightData(50));
new TableColumn(table, SWT.NONE).setText("Departure location");
layout.addColumnData(new ColumnWeightData(50));
new TableColumn(table, SWT.NONE).setText("Destination");
layout.addColumnData(new ColumnWeightData(50));
new TableColumn(table, SWT.NONE).setText("Cost");