TableHeader

Swing component: JTableHeader
Swing tutorial: How to Use Tables

Properties

TableHeader Properties

Colors

UI Key Style Key since v2 Description
TableHeader.foreground foreground text color
TableHeader.background background background color
TableHeader.hoverForeground since v3.1 hoverForeground text color if mouse is over column (optional)
TableHeader.hoverBackground since v3.1 hoverBackground background color if mouse is over column (optional)
TableHeader.pressedForeground since v3.1 pressedForeground text color if mouse is pressed on column (optional)
TableHeader.pressedBackground since v3.1 pressedBackground background color if mouse is pressed on column (optional)
TableHeader.separatorColor separatorColor vertical column separator color
TableHeader.bottomSeparatorColor bottomSeparatorColor bottom separator color
Table.sortIconColor sortIconColor sort icon color

Sizes

UI Key Style Key since v2 Type Description
TableHeader.height height int preferred height of header
TableHeader.cellMargins cellMargins Insets space between cell bounds and cell text

Other

UI Key Style Key since v2 Type Description
TableHeader.font font Font font used to render text
TableHeader.showTrailingVerticalLine showTrailingVerticalLine boolean if true, do not hide trailing vertical line of last column
TableHeader.sortIconPosition sortIconPosition String sort icon position relative to text: right (default), left, top or bottom
Component.arrowType arrowType String sort icon arrow type: chevron (default) or triangle