• Post Reply Bookmark Topic Watch Topic
  • New Topic

JTable filled with grid lines (empty rows)

 
Akila Sachitra
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi. I would like to have all the area of JTable filled with grid lines, not
only the area with added rows. Is this possible, and if so - how to do
that?

Thanks.
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
'Rows' exist when data exists. The JTable figures this out after 'asking' the underlying table model by invoking getRowCount() Override this to return an appropriate number of rows (of course you will need to ensure you also override the getValueAt(int row, int column) to return 'empty' data when required
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!