Align the values of the cells in JTable?

后端 未结 7 802
闹比i
闹比i 2020-12-18 18:28

I\'m not aware of how to align the values of cells in JTable.

For Ex,The Jtable shows, Name Salary Mr.X 100000.50 XXXX 234.34

相关标签:
7条回答
  • 2020-12-18 19:06

    The way to go about it is to specify a custom cell renderer for each column. Each renderer will format that data differently (names will e aligned to the left, decimals to the right, ...)

    0 讨论(0)
提交回复
热议问题