private Dimension getHeadingSize() {
    Dimension s = new Dimension();
    int c = getComponentCount();
    for (int i = 0; i < c; i++) {
      Component comp = getComponent(i);
      TabWrapper tab = (TabWrapper) tabs.get(comp);
      if (tab != null) {
        int thw =
            (HORIZONTAL_GAP * 2)
            +
            (metrics != null ?
             metrics.stringWidth(tab.text == null ? "" : tab.text) : 0) //$NON-NLS-1$
            + (tab.image == null ? 0 : (IMAGE_TEXT_GAP + tab.image.getWidth(this)));
        int thh = (VERTICAL_GAP * 2) +
            Math.max(metrics != null ? metrics.getHeight() : 0,
                     tab.image == null ? 0 : tab.image.getHeight(this));
        if (position == TOP || position == BOTTOM) {
          s.width += thw;
          s.height = Math.max(s.height, thh);
        }
        else {
          s.height += thh;
          s.width = Math.max(s.width, thw);
        }
      }
      else {
        /*DEBUG*/System.err.println(Messages.getString("TabbedPanel.tabWrapperCouldNotBeFound") + i + " [" + comp + //$NON-NLS-1$ //$NON-NLS-2$
                                    " could not be found"); //$NON-NLS-1$
      }
    }
    return s;

  }