title: Java. How to create a JPanel with resizable text area and fixed buttons area?
body: <p>How to get a layout like this in Java?</p>
  
  <p>|-----------------------------------------------|<br>
  | Fixed size "top" panel with labels<br>
  |----------------------------------------------|<br>
  |  Resizable text area<br>
  |  It expands to most of the parent<br>
  |  panel (except the fixed areas)<br>
  |<br>
  |----------------------------------------------|<br>
  |  fixed JTextArea(always 2 lines<br>
  |  full frame width)<br>
  |----------------------------------------------|<br>
  |                 RightCenteredButtons<br>
  |----------------------------------------------|        </p>
  
  <p>I tried the code below, but I cant get it to work. Elements are floating, text areas are clashing. I can't figure out how to expand text area to all available frame, except fixed areas.</p>
  
  <pre><code> JPanel top = new JPanel(new FlowLayout(FlowLayout.LEFT , 10, 10));
   top.add(label1);
    ....
   top.add(labelLast);
   add(top);
   JTextArea area1 = new JTextArea();
   add(area1);
   JTextArea area2 = new JTextArea();
   add(area2);
   JPanel bottom= new JPanel(new FlowLayout(FlowLayout.RIGHT , 10, 10));
   bottom.add(button1);
    ....
   bottom.add(buttonLast);
   add(bottom);
  </code></pre>