Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Formatting a JTable  RSS feed

 
Jeremy Hooie
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I'm using a JTable to create a calendar. I want to be able to change the format (left, center, right) on certain rows, but not on the whole table. Does anyone know a quick and easy way to do this?
Thanks,
Jeremy
 
Paul Stevens
Ranch Hand
Posts: 2823
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Create your own cell renderer. Implement the TableCellRenderer interface and make your code changes in the getTableCellRendererComponent() method.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!