title: Button Layout Issues with JFrame
body: <p><img src="https://i.stack.imgur.com/vALgb.jpg" alt="Broken buttons"><strong>Picture included</strong> I have another issue where my buttons go to the top-right after the user inputs their name.  At this point, text shows up in the GUI on the LEFT side of the center which seems it would be "WEST" when I put "CENTER".  Code:</p>
  
  <pre><code>public TheDungeon()
  {
    setTitle("InsertGameNameHere");
    setSize(750, 600);
    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    setLayout(new BorderLayout());
    setLocationRelativeTo(null);
  
    buildButtonPanel();             
  
    characterInfoPanel = new JLabel("&lt;html&gt;Character information will go here&lt;/html&gt;");
    gameScreen = new JLabel();
    inventoryPanel = new JLabel("&lt;html&gt;This is for the inventory&lt;/html&gt;");
  
    add(gameScreen, BorderLayout.CENTER);
    add(buttonPanel, BorderLayout.SOUTH);
  
    setVisible(true);    
  
    //Program run
    userName();
    gameScreen.setText("&lt;html&gt;Welcome "+name+", to the game that has no name!&lt;/html&gt;");
    classWindow();
  } 
  
  private void buildButtonPanel()
  {
    // Create a panel for the buttons.
    buttonPanel = new JPanel();
  
    // Create the buttons.
    b1 = new JButton("Button 1");
    b2 = new JButton("Button 2");
    b3 = new JButton("Button 3");
    b4 = new JButton("Button 4");
    b5 = new JButton("Button 5");
  
    // Add the buttons to the button panel.
    buttonPanel.add(b1);
    buttonPanel.add(b2);
    buttonPanel.add(b3);
    buttonPanel.add(b4);
    buttonPanel.add(b5);
  }
  
  
  private void userName() {
  name = JOptionPane.showInputDialog("What will your name be?");
  }
  </code></pre>