title: How to set the component size with GridLayout? Is there a better way?
body: <p>I am working on a larger GUI with Java and I am becoming angry on Layout Managers.</p>
  <p>I have a &quot;Settings-Panel&quot; with a variable number of JComponents in it (Labels, Buttons, JSpinners, JSliders,...). I just want the following:</p>
  <p>JLabel &lt;-&gt; JComponent</p>
  <p>JLabel &lt;-&gt; JComponent</p>
  <p>JLabel &lt;-&gt; JComponent</p>
  <p>...</p>
  <p>My Panel has a size of 500px, so that there is enough space for a lot of components. Unfortunately the GridLayout always stretches the size of the Components to the whole Panel, even if I set a MaximumSize for every component. It looks stupid if there are only two buttons each with a height of 250px.</p>
  <p>I tried FlowLayout, but I cannot figure out a way to make new lines properly. I tried BoxLayout.Y_AXIS, but the Components are always centered, and Label and Component are not in the same line.</p>
  <p>Does anybody know a good and short way with LayoutManagers to handle this properly?</p>