title: How to avoid components pushing up/down on one another
body: <p>I'm new to using Java Swing and am looking to produce a GUI that resembles something like this:
  <a href="https://i.stack.imgur.com/hBMnw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hBMnw.png" alt="crude depiction of goal GUI" /></a></p>
  <p>I am pretty close but having an issue where a JLabel pushes up on the grid design like so:
  <a href="https://i.stack.imgur.com/V4oVd.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/V4oVd.png" alt="example of pushed up JLabel" /></a></p>
  <p>How can I avoid this happening? I place the grid into a GridBagLayout panel and the JLabel into another GridBag panel(plan on putting a JToolbar here too), then add them to the main frame.</p>
  <pre><code>GridBagLayout tileLayout = new GridBagLayout();
  GridBagConstraints tileLayoutConstraints = new GridBagConstraints();
  JPanel tilePanel = new JPanel(tileLayout);
  JPanel selectionPanel = new JPanel(tileLayout);
  TileButton[][] tileAccessMatrix = new TileButton[4][4];
  
  public BoardUILayer() {
      setSize(1920, 1080);
      buildBoardTiles();
      buildResourcePrompt();
      add(selectionPanel, BorderLayout.SOUTH);
      add(tilePanel, BorderLayout.CENTER);
  }
  private void buildBoardTiles() {
      for (int r = 0; r &lt; tileAccessMatrix.length; r++) {
          for (int c = 0; c &lt; tileAccessMatrix[r].length; c++) {
              TileButton temp = new TileButton(r, c);
              tileAccessMatrix[r][c] = temp;
              tileLayoutConstraints.ipadx = 115;
              tileLayoutConstraints.ipady = 115;
              tileLayoutConstraints.gridx = r;
              tileLayoutConstraints.gridy = c;
              temp.addActionListener(temp);
              tilePanel.add(temp, tileLayoutConstraints);
          }
      }
  }
  
  public void buildResourcePrompt() {
      final JLabel resourceTextLabel = new JLabel(&quot;What resource would you like?&quot;);
      tileLayoutConstraints.ipadx = 0;
      tileLayoutConstraints.ipady = 400;
      tileLayoutConstraints.gridx = 50;
      tileLayoutConstraints.gridy = 50;
      selectionPanel.add(resourceTextLabel, tileLayoutConstraints);
  }
  </code></pre>