public Border createInsetsTabBorder(boolean roundEdges, boolean open, boolean highlight) {
    Border insetsBorder = new Border() {
      public boolean isBorderOpaque() {
        return false;
      }

      public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) {
      }

      public Insets getBorderInsets(Component c) {
        TabbedPanel tp = TabbedUtils.getParentTabbedPanel(c);
        if (tp != null) {
          Direction d = tp.getProperties().getTabAreaOrientation();
          return new Insets(d == Direction.RIGHT || d == Direction.LEFT ? raised : 0, d == Direction.UP ||
                                                                                      d == Direction.DOWN ?
                                                                                      raised : 0, d == Direction.RIGHT ||
                                                                                                  d == Direction.LEFT
                                                                                                  ? 1
                                                                                                  : 0, d ==
                                                                                                       Direction.UP ||
                                                                                                       d ==
                                                                                                       Direction.DOWN ?
                                                                                                       1 : 0);
        }
        return new Insets(0, 0, 0, 0);
      }
    };
    return new CompoundBorder(insetsBorder, doCreateTabBorder(roundEdges, open, highlight, true));
  }