title: Constant Width SashForm
body: <p>My application has a SashForm with two children. I want the left child to stay the same size when the window is resized. I want the same thing Eclipse does with the Package Explorer and the main editor. When you resize the window only the text editor changes size. However, the Package Explorer is still resizeable by the sash.</p>
  
  <p>I tried using the following</p>
  
  <pre><code>sashForm.addControlListener(new ControlAdapter() {
      @Override
      public void controlResized(ControlEvent e) {
          int width = sashForm.getClientArea().width;
          int[] weights = sashForm.getWeights();
          weights[1] = width - weights[0];
          sashForm.setWeights(weights);
      }
  });
  </code></pre>
  
  <p>The problem is the width of the left size either shrinks to 0 or expands too much. It looks like the weights are updated before this is called or something.</p>
  
  <p>If I set weights[0] equal to some constant it does what I want.</p>