More than one JToolBar

Main.java:

import javax.swing.border.*;
import java.awt.event.*;
import javax.swing.*;
import java.awt.*;
 
public class Main extends JFrame
{
   public Main()
   {
      JToolBar toolBar1 = new JToolBar();
      JButton gifButton = new JButton("GIF");
      JButton jpgButton = new JButton("JPG");
      JButton tiffButton = new JButton("TIFF");
      toolBar1.add(gifButton);
      toolBar1.add(jpgButton);
      toolBar1.add(tiffButton);
 
      JToolBar toolBar2 = new JToolBar();
      JButton openButton = new JButton("Open");
      JButton saveButton = new JButton("Save");
      JButton exitButton = new JButton("Exit");
      toolBar2.add(openButton);
      toolBar2.add(saveButton);
      toolBar2.add(exitButton);
 
      getContentPane().setLayout(new BorderLayout());
      toolBar1.setBorder(new CompoundBorder(new LineBorder(Color.black),
                                            new EmptyBorder(10, 10, 10, 10)));
      toolBar2.setBorder(new CompoundBorder(new LineBorder(Color.black),
                                            new EmptyBorder(10, 10, 10, 10)));
 
      JPanel panel = new JPanel(new FlowLayout(FlowLayout.CENTER));
      panel.add(toolBar1);
      panel.add(toolBar2);
 
      getContentPane().add(BorderLayout.NORTH, panel);
 
      addWindowListener(new WindowAdapter() {
         public void windowClosing(WindowEvent we) {
            System.exit(0);
         }
      });
   }
      
   public static void main(String []args) {
      Main main = new Main();
      main.setSize(300, 300);
      main.setVisible(true);
   }
}