title: Positioning components in Swing GUIs
body: <p>I have some questions on positioning components and some questions on text fields and text areas (Java Swing). Any help is greatly appreciated.</p>
  
  <p>Right now I am trying to have two text fields beside each other with a different label above each describing what that text field does.  To achieve this I have placed them in a <code>GridLayout(2, 2)</code>.  </p>
  
  <ol>
  <li><p>Is this the best way?  It is the only way I know to have a label directly over another component.  Is there a better way?  What about if there is just one label above one button.  Is it sensible to position  this through a <code>GridLayout(2, 1)</code>?  I am visually impaired so I do not think positioning buttons just by their pixel position is an option unless there is a simple  way to place components at a relative number of pixels to another component.</p></li>
  <li><p>That leads me to my next question.
  What is the best way to have the same UI as above but with another component (button) centered under it.  Essentially the UI should compose of two Named text fields with a calculate button under.  The way I did this is by putting the above components in a panel, and adding that plus the calculate button to a surrounding panel with a <code>GridLayout(2, 1)</code>.  The problem is that the button becomes as big as the panel above it (I'm assuming).  How can I adjust this and still have the button perfectly aligned under the panel of text fields/labels?  Similarly with labels above text areas.  The label should be small but have a larger space for the text area under.</p></li>
  <li><p>(text field):
  Again referring to the UI above, if the user types many characters into the first text field, will the letters go over the text field on the right?  If so how can I prevent this?</p></li>
  <li><p>If I append text to a text area and it is already full, will it automatically allow the user to scroll?  If not what is a simple way to make the text area scrollable?</p></li>
  <li><p>Right now I am not setting a size of the text area.  Does it just grow as I add text?  Does it have a default size as in number of characters?</p></li>
  </ol>