This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JTable Delete row problem

 
helen booths
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
I have a problem with my jtable and i couldn't find anywhere the exact solution and i really need some help. The code i am using for the table is the following:

When i try to call the removeRow like this:

i get the error cannot resolve symbol for method tm.removeRow(int);
How can i add my own methods in the model and use them?
Is their any other way of deleting a row using the above tablemodel that i have?
I will really appreciate any help.
Thank you
 
Fuqiang Zhao
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The DefaultTableModel in javax.swing.table package provides this feature.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic