import java.awt.BorderLayout;
import javax.swing.JFrame;
import javax.swing.JToolBar;
public class Main {
public static void main(String[] argv) throws Exception {
// Add the toolbar to a frame
JFrame frame = new JFrame();
JToolBar toolbar = new JToolBar();
frame.getContentPane().add(toolbar, BorderLayout.NORTH);
frame.pack();
frame.setVisible(true);
}
}