class AquaCloseableTabbedPaneUI extends CloseableModernTabbedPaneUI {

  /**
   * the horizontal position of the text
   */
  private int horizontalTextPosition = SwingUtilities.LEFT;

  /**
   * Creates a new instance of
   * <code>CloseableTabbedPaneUI</code>
   */
  public AquaCloseableTabbedPaneUI() {
    super(100);
  }

  /**
   * Creates a new instance of
   * <code>CloseableTabbedPaneUI</code>
   *
   * @param horizontalTextPosition the horizontal position of the text (e.g.
   *                               SwingUtilities.TRAILING or SwingUtilities.LEFT)
   */
  public AquaCloseableTabbedPaneUI(int horizontalTextPosition) {
    this();
    this.horizontalTextPosition = horizontalTextPosition;
  }

  Color darkTabColor = new Color(200, 200, 200, 100);
  Color borderColor = new Color(150, 150, 150);

  @Override
  protected void paintTabBackground(Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h, boolean isSelected) {

    super.paintTabBackground(g, tabPlacement, tabIndex, x, y, w, h, isSelected);
    if (!isSelected) {
      g.setColor(darkTabColor);
      g.fillRect(x + 1, y + 2, w - 1, h - 1);
    }
    g.setColor(borderColor);
    g.drawLine(x + w, y + 2, x + w, y + h);
    g.drawLine(x, y + 2, x, y + h);
    if (isSelected) {
      g.setColor(Color.white);
      g.drawLine(x, y + h, x + w, y + h);
    }
  }

  /**
   * Layouts the label
   *
   * @param tabPlacement the placement of the tabs
   * @param metrics      the font metrics
   * @param tabIndex     the index of the tab
   * @param title        the title of the tab
   * @param icon         the icon of the tab
   * @param tabRect      the tab boundaries
   * @param iconRect     the icon boundaries
   * @param textRect     the text boundaries
   * @param isSelected   true whether the tab is selected, false otherwise
   */
  @Override
  protected void layoutLabel(int tabPlacement, FontMetrics metrics,
                             int tabIndex, String title, Icon icon,
                             Rectangle tabRect, Rectangle iconRect,
                             Rectangle textRect, boolean isSelected) {<FILL_FUNCTION_BODY>}
}


    textRect.x = textRect.y = iconRect.x = iconRect.y = 0;

    javax.swing.text.View v = getTextViewForTab(tabIndex);
    if (v != null) {
      tabPane.putClientProperty("html", v);
    }

    SwingUtilities.layoutCompoundLabel((JComponent) tabPane,
            metrics, title, icon,
            SwingUtilities.CENTER,
            SwingUtilities.CENTER,
            SwingUtilities.CENTER,
            //SwingUtilities.TRAILING,
            horizontalTextPosition,
            tabRect,
            iconRect,
            textRect,
            textIconGap + 2);

    tabPane.putClientProperty("html", null);

    int xNudge = getTabLabelShiftX(tabPlacement, tabIndex, isSelected);
    int yNudge = getTabLabelShiftY(tabPlacement, tabIndex, isSelected);
    iconRect.x += xNudge;
    iconRect.y += yNudge;
    textRect.x += xNudge;
    textRect.y += yNudge;
  
<methods>public void <init>(int) ,public sealed void paint(java.awt.Graphics, javax.swing.JComponent) <variables>private static final java.util.logging.Logger LOGGER,private static final java.lang.String TABBED_PANE_UI_LOGGER,private static int TAB_HEIGHT,private int TAB_WIDTH,private static java.awt.image.BufferedImage tab,private static java.awt.image.BufferedImage tabClose,private static java.awt.image.BufferedImage tabClosePressed,private static java.awt.image.BufferedImage tabCloseRollover,private static java.awt.image.BufferedImage tabEnd,private int tabPressed,private static java.awt.image.BufferedImage tabRollover,private static java.awt.image.BufferedImage tabRolloverEnd,private static java.awt.image.BufferedImage tabSelected,private static java.awt.image.BufferedImage tabSelectedEnd,private static java.awt.image.BufferedImage tabSelectedPressed,private static java.awt.image.BufferedImage tabSelectedPressedEnd,private int width