public void paint(Graphics g) {
   Dimension size = getSize();
   int index = 0;
   if (column == viewIndexForColumn(header.getDraggedColumn())) {
     index = 2;
   } else if (isSelected || hasFocus || hasRollover) {
     index = 1;
   }
   skin.paintSkin(g, 0, 0, size.width - 1, size.height - 1, index);
   super.paint(g);
 }
    public Component getTableCellRendererComponent(
        JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
      if (table != null) {
        JTableHeader header = table.getTableHeader();
        if (header != null) {
          setFont(header.getFont());
        }
      }
      this.isSelected = isSelected;
      this.hasFocus = hasFocus;
      this.column = column;
      this.hasRollover = (column == rolloverColumn);
      if (skin == null || skin.getContentMargin() == null) {
        skin = XPStyle.getXP().getSkin(header, "header.headeritem");
      }
      setText((value == null) ? "" : value.toString());
      setBorder(new EmptyBorder(skin.getContentMargin()));

      return this;
    }