This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
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 is not inserting the data  RSS feed

 
Maheswaran Devaraj
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I tried to insert to the value into the JTable, But I couldn't do it, Help me to resolve this.




Thanks and Regards,
Mahes
 
Rob Spoor
Sheriff
Posts: 21048
85
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maheswaran Devaraj wrote:

The return of that method determines how many rows will be displayed. You will need to return something other than 0.
If you want to be able to add data, an Object[][] is a bad idea. A List<Object[]> will be a better idea; it will allow you to add rows (being Object[] instances). Also, use the fireXXX methods of AbstractTableModel after something has changed in your model, or you won't see the changes.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!