setLayout(new BorderLayout()); JToolBar toolbar = new JToolBar(); // put 3 checkboxes in the toolbar for (int i=0; i<3;i++) { toolbar.add(new JCheckBox("Checkbox #" + i)); } add(toolbar,BorderLayout.NORTH);