title: How to auto-resize all columns of a JTable to the same size?
body: <p>I'm using a JTable on a project.
  I want the table to auto-resize all columns to the same size, and at the same time, to fill the width of the containing JScrollPane.</p>
  
  <p>I can't just set a preferred width to a fixed value, because when the user will resize the frame, I want all the columns being resized to the same size, but with the constraint that it must still fill 100% of the JScrollPane.</p>
  
  <p>For instance, if the JScrollPane has a width of 1000, and I've got 10 columns, I'd like the columns to each have a size of 100.
  If the JScrollPane is then shrinked to 500, I'd like the columns to resize to 50 each.</p>
  
  <p>For now, I just set <code>JTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF)</code> and here's the result :</p>
  
  <p><img src="https://i.stack.imgur.com/gglPw.png" alt="enter image description here"></p>
  
  <p>How can I simply achieve that ?</p>
  
  <p>Thanks.</p>