protected JButton addButton (JToolBar toolbar, String cmd, String tip,
TileIcon icon)
{
// create the button and configure accordingly
JButton button = new JButton(new DimmedIcon(icon));
button.setSelectedIcon(icon);
button.addActionListener(this);
button.setActionCommand("tbar_" + cmd);
button.setToolTipText(tip);