title: java object resize on window resize
body: <p>I've to resize few elements like JTable on window resize. I've been trying this code, but it doesn't work correctly:</p>
  
  <pre><code>    table.setLocation(0, 23);
      Dimension siz = contentPane.getMaximumSize();
      table.setSize(siz.height, siz.width - 46);
  </code></pre>
  
  <p>It resizing my table, but it making it endless, what i don't want. Also I would like to connent scrollbar to this table, and if it's possible - set column width in precentage</p>