public Toolbar(CConn cc_) {
    super();
    cc = cc_;
    BufferedImage bi =
      new BufferedImage(176, 16, BufferedImage.TYPE_INT_ARGB);
    Graphics2D g = bi.createGraphics();
    g.drawImage(toolbarImage, 0, 0, 176, 16, null);
    setAlignmentX(java.awt.Component.LEFT_ALIGNMENT);
    setAlignmentY(java.awt.Component.CENTER_ALIGNMENT);
    setFloatable(false);
    setBorder(new EmptyBorder(1, 2, 1, 0));
    for (int i = 0; i < 11; i++) {
      ImageIcon icon =
        new ImageIcon(tk.createImage(bi.getSubimage(i * 16, 0, 16, 16).getSource()));
      AbstractButton button;
      switch (i) {
      case 7:
        // fallthrough
      case 8:
        button = new JToggleButton(icon);
        button.setBorder(BorderFactory.createLoweredBevelBorder());
        break;
      default:
        button = new JButton(icon);
        button.setBorder(BorderFactory.createEmptyBorder(2, 2, 2, 2));
      }
      button.setName(buttons[i]);
      button.setToolTipText(buttons[i]);
      button.setBorderPainted(false);
      button.setFocusPainted(false);
      button.setFocusable(false);
      button.addActionListener(this);
      button.addMouseListener(new ButtonListener(button));
      button.setContentAreaFilled(false);
      add(button);
      add(Box.createHorizontalStrut(2));
      if (i == 1 || i == 4 || i == 8) {
        // ref http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4346610
        add(new JSeparator(JSeparator.VERTICAL) {
              public Dimension getMaximumSize() {
                return new Dimension(getPreferredSize().width,
                                     Integer.MAX_VALUE);
              }
            });
        add(Box.createHorizontalStrut(2));
      }
    }
  }