public final void centerTop(Rectangle bounds) {
    Dimension textSize = getPreferredSize();
    setBounds(bounds.x + bounds.width / 2 - textSize.width / 2, bounds.y - textSize.height - 10, textSize.width, textSize.height);
  }
public final void centerTop(Rectangle bounds)