title: Two BoxLayouts Side by Side in Swing
body: <p>I have a BoxLayout in my frame with all my <b>main</b> buttons, and another BoxLayout with buttons for help and to exit the program. I don't know how to have these two side-by-side, and setting the location of the BoxLayouts does nothing.</p>
  <p>This is how I want my frame to look:
  <br>
  <a href="https://i.stack.imgur.com/IPqnM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/IPqnM.png" alt="Frame Look" /></a></p>
  <p>And this is my code:</p>
  <pre><code>private static void contentGUI(Container pane)  {
      pane.setLayout(new BoxLayout(pane, BoxLayout.Y_AXIS));
  
      JButton task1 = new JButton(&quot; &gt; Advanced CPU Settings&quot;);
      pane.add(task1); 
      JButton task2 = new JButton(&quot; &gt; Advanced Memory Settings&quot;);
      pane.add(task2);
      JButton task3 = new JButton(&quot; &gt; Advanced GPU Settings&quot;);
      pane.add(task3);
      JButton task4 = new JButton(&quot; &gt; Advanced Case Fan Settings&quot;);
      pane.add(task4);
  
  }
  
  private static void toolTips() throws IOException, FontFormatException {
      JPanel toolTipPane = new JPanel();
      toolTipPane.setLayout(new BoxLayout(toolTipPane, BoxLayout.Y_AXIS));
  
      JButton tip1 = new JButton(&quot;Esc: Exit&quot;);
      toolTipPane.add(tip1);
      JLabel tip2 = new JLabel(&quot;F1: About&quot;);
      toolTipPane.add(tip2);
  }
  </code></pre>