Here you can find the source of createButtonPanel()
private static JPanel createButtonPanel()
//package com.java2s; /*//from w w w . j a va2 s . co m dsh-iconbundle-tango-examples Examples using the iconbundle-tango library. Copyright (c) 2005-2013 held jointly by the individual authors. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; with out even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. > http://www.fsf.org/licensing/licenses/lgpl.html > http://www.opensource.org/licenses/lgpl-license.php */ import javax.swing.Box; import javax.swing.BoxLayout; import javax.swing.JButton; import javax.swing.JPanel; import javax.swing.border.EmptyBorder; public class Main { /** * Create and return the button panel. * * @return the button panel */ private static JPanel createButtonPanel() { JPanel buttonPanel = new JPanel(); buttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.X_AXIS)); buttonPanel.setBorder(new EmptyBorder(0, 20, 20, 20)); // todo: use osx built-in help buttonPanel.add(new JButton("Help")); buttonPanel.add(Box.createGlue()); buttonPanel.add(Box.createGlue()); buttonPanel.add(Box.createGlue()); return buttonPanel; } }