title: How to have text fields fill 100% horizontally
body: <p>If I have a text field with SWT, how can I get the field to fill to 100% or some specified width.</p>
  
  <p>For example, this text field will only reach for so much horizontally.</p>
  
  <pre><code>public class Tmp {
      public static void main (String [] args) {
          Display display = new Display ();
          Shell shell = new Shell (display);
          GridLayout gridLayout = new GridLayout ();
          shell.setLayout (gridLayout);
  
          Button button0 = new Button(shell, SWT.PUSH);
          button0.setText ("button0");
  
          Text text = new Text(shell, SWT.BORDER | SWT.FILL);
          text.setText ("Text Field");
  
          shell.setSize(500, 400);
          //shell.pack();
          shell.open();
  
          while (!shell.isDisposed ()) {
              if (!display.readAndDispatch ())
                  display.sleep ();
          }
          display.dispose ();
      }
  }
  </code></pre>