title: Dimension, Only changing the width/height
body: <p>How do I only change the width or height of a component that requires a <code>Dimension</code> object? Currently I do it like this:</p>
  
  <pre><code>jbutton.setPreferredSize(new Dimension(button.getPreferredSize().width, 100));
  </code></pre>
  
  <p>But I have a feeling that I'm doing it the wrong way. 
  What is the best way to approach this if there is a better way?</p>