Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JTable filled with grid lines (empty rows)  RSS feed

 
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
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!