0

I have created a table with the default table model that contains three columns and some rows, what I want to do is to customize the style of the header with a background color and also customize the background color of each rows with a different color than header colors.

Also I want to be able to set the size of each column to be different I want one columns to be larger than other two columns.

Please anyone can help?

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
Amira Elsayed Ismail
  • 9,216
  • 30
  • 92
  • 175

1 Answers1

0

Set the styles for TableHeader and TableCell respectively.

If you want more control than that derive table and override:

protected Component createCell(Object value, int row, int column, boolean editable)
Shai Almog
  • 51,749
  • 5
  • 35
  • 65