title: Swing - Group Layout - How to put the Elements in the right place?
body: <p>I am currently coding on a swing layout. Here is what it looks like right now:</p>
  
  <p><img src="https://i.stack.imgur.com/5Yc9D.jpg" alt="enter image description here"></p>
  
  <p>And this is what it should look like:</p>
  
  <p><img src="https://i.stack.imgur.com/M1RNy.jpg" alt="enter image description here"></p>
  
  <p>right now the Button is on the wrong Place:</p>
  
  <p>Here is my code:</p>
  
  <pre><code>    layout.setHorizontalGroup(
              layout.createSequentialGroup()
              .addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                      .addComponent(header)//table header
                      .addComponent(tableG)//here comes the table
                      .addGroup(layout.createParallelGroup()
                              .addComponent(b3)//button1
                              .addComponent(b4)))//button2
              );
      layout.setVerticalGroup(
              layout.createSequentialGroup()
              .addGroup(layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                      .addComponent(b3)//button1
                      .addComponent(b4))   //button2
                      .addGroup(layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                              .addComponent(header)//tableheader
  
  
  .addComponent(tableG))//table
                  );
  
          layout.linkSize(SwingConstants.HORIZONTAL, b3, b4);
  </code></pre>
  
  <p>Why is my Button over my table?</p>
  
  <p>I appreaciate your answers!!!</p>