title: Formatting a SWT table with a single column
body: <p>I have the following table:</p>
  
  <p><img src="https://i.stack.imgur.com/H2uLz.png" alt="enter image description here"></p>
  
  <p>What I'm wanting to do is extend the column to the size of the window without displaying the extra lines where there is no column (the cells to the right of the item column). I'm somewhat familiar with most of SWT, but these tables are still confusing me.</p>
  
  <p>I want to be able to select an item by clicking anywhere on the row.</p>
  
  <p>Here is the simple UI code I used to make the above screen cap:</p>
  
  <pre><code>public static void main(String[] args) { 
      Display display = new Display();
      Shell shell = new Shell(display);
      shell.setLayout(new GridLayout());
  
      Table table = new Table (shell, SWT.MULTI | SWT.BORDER | SWT.FULL_SELECTION);
      table.setLinesVisible (true);
      table.setHeaderVisible (false);
      GridData data = new GridData(SWT.FILL, SWT.FILL, true, true);
      data.heightHint = 200;
      table.setLayoutData(data);
  
      TableColumn column = new TableColumn (table, SWT.NONE);
      column.setResizable(true);
      int count = 15;
      for (int i=0; i&lt;count; i++) {
          TableItem item = new TableItem (table, SWT.NONE);
          item.setText (0, "item " + i);
      }
      column.pack();
  
      shell.pack();
      shell.open();
  
      while(!shell.isDisposed()) {
          if (!display.readAndDispatch()) {
              display.sleep();
          }
      }
      display.dispose();
  }
  </code></pre>