package com.seaglasslookandfeel.demo;

import java.awt.BorderLayout;
import java.awt.Color;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JPanel;
import javax.swing.JToggleButton;
import javax.swing.JToolBar;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;

public class TestToolBar {

    public static void main(String[] args) {
        if (true) {
            try {
//                System.setProperty("SeaGlass.Override.os.name", "Windows");
                UIManager.setLookAndFeel("com.seaglasslookandfeel.SeaGlassLookAndFeel");
            } catch (Exception e) {
                e.printStackTrace();
            }
        }

        SwingUtilities.invokeLater(new Runnable() {
            public void run() {
                
                JMenuBar mb = new JMenuBar();
                JMenu m1 = new JMenu("File");
                JMenu m2 = new JMenu("Edit");
                JMenu m3 = new JMenu("Help");
                mb.add(m1);
                mb.add(m2);
                mb.add(m3);

                JButton button1 = new JButton("Test 1");
                JToggleButton button2 = new JToggleButton("Test 2");
                JButton button3 = new JButton("Test 3");

                JToolBar toolbar = new JToolBar();

                JPanel foo = new JPanel();
                foo.add(button3);
                toolbar.add(button1);
                toolbar.addSeparator();
                toolbar.add(button2);
                toolbar.addSeparator();
                toolbar.add(foo);

                JFrame frame = new JFrame();
                frame.setJMenuBar(mb);
                frame.getRootPane().putClientProperty("apple.awt.brushMetalLook", Boolean.TRUE);
                
                JPanel panel = new JPanel();
                panel.setBackground(Color.white);
                panel.add(new JLabel("Hi there!"));

                frame.getContentPane().add(toolbar, BorderLayout.PAGE_START);
                frame.add(panel, BorderLayout.CENTER);
                frame.setSize(275, 175);
                frame.setLocationRelativeTo(null);
                frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
                frame.setVisible(true);
            }
        });
    }

}

@@ -1146,175 +1146,61 @@
    J
-Button button1 = new JButton(%22Test 1%22);%0A                JToggleButton button2 = new JToggleButton(%22Test 2%22);%0A                JButton button3 = new JButton(%22Test 3%22
+ToolBar toolbar1 = makeToolBar(JToolBar.HORIZONTAL
 );%0A
-%0A
     
@@ -1231,24 +1231,24 @@
 lbar
+2
  = 
-new J
+make
 ToolBar(
 );%0A%0A
@@ -1247,164 +1247,95 @@
 Bar(
-);%0A%0A                JPanel foo = new JPanel();%0A                foo.add(button3);%0A                toolbar.add(button1);%0A                toolbar.addSeparator(
+JToolBar.HORIZONTAL);%0A                JToolBar toolbar3 = makeToolBar(JToolBar.VERTICAL
 );%0A 
@@ -1353,101 +1353,57 @@
     
-toolbar.add(button2);%0A                toolbar.addSeparator();%0A                toolbar.add(foo
+JToolBar toolbar4 = makeToolBar(JToolBar.VERTICAL
 );%0A%0A
@@ -1455,32 +1455,34 @@
                 
+//
 frame.setJMenuBa
@@ -1800,16 +1800,17 @@
 (toolbar
+1
 , Border
@@ -1820,17 +1820,232 @@
 out.
-PAGE_STAR
+NORTH);%0A                frame.getContentPane().add(toolbar2, BorderLayout.SOUTH);%0A                frame.getContentPane().add(toolbar3, BorderLayout.WEST);%0A                frame.getContentPane().add(toolbar4, BorderLayout.EAS
 T);%0A
@@ -2133,16 +2133,16 @@
 ize(
-275, 175
+600, 600
 );%0A 
@@ -2260,24 +2260,24 @@
 _ON_CLOSE);%0A
-
             
@@ -2309,32 +2309,708 @@
 );%0A            %7D
+%0A%0A            /**%0A             * @return%0A             */%0A            private JToolBar makeToolBar(int orientation) %7B%0A                JButton button1 = new JButton(%22Test 1%22);%0A                JToggleButton button2 = new JToggleButton(%22Test 2%22);%0A                JButton button3 = new JButton(%22Test 3%22);%0A%0A                JToolBar toolbar = new JToolBar(orientation);%0A%0A                JPanel foo = new JPanel();%0A                foo.add(button3);%0A                toolbar.add(button1);%0A                toolbar.addSeparator();%0A                toolbar.add(button2);%0A                toolbar.addSeparator();%0A                toolbar.add(foo);%0A                return toolbar;%0A            %7D
 %0A        %7D);%0A   

Put toolbars on all sides of main panel.