1

As second picture says, I want to anchor 'HeaderModel' left and 'CellModel' right. If its possible...

enter image description here

Extreme Coders
  • 3,441
  • 2
  • 39
  • 55
jovanMeshkov
  • 757
  • 5
  • 12
  • 29

1 Answers1

2

A JTable will display whatever data is returned by the getValueAt() method. You can change a cell's appearance using a suitable renderer. You can obtain a copy of the default header renderer, as shown here. This complete example shows how to apply the renderer to the table's first column.

image

Community
  • 1
  • 1
trashgod
  • 203,806
  • 29
  • 246
  • 1,045