Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
    Bookmark Topic Watch Topic
  • New Topic

Removing Rows from JTable

 
Thamu Gurung
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Report post to moderator
hi ,

I am still in process of learning Java and this time i got strucked in removing the rows from the JTable , actually i want the user to select a row and click on the button("delete the row") or enter the row ID in a a provided JTextField , which will be mentioned in JTable as a column.

My main problem is that I am unable to retrieve the indexing of the rows and coordinating with .remove() method .

Please Help.

 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
 
Thamu Gurung
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Report post to moderator
hello ,

thankyou

I did that and now i can delete the selected row from the JTable , but the problem now which i am having is , the datas are deleted olny in the table and when i run the program again, the deleted data is reloaded as its not deleted from the database (i am using .txt file).

Please suggest me how to delete the datas from the .txt database .

Will be highly thankful .

Regards ,
 
Thamu Gurung
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Report post to moderator
hi ,

Maneesh , I could not get the starting point from the link posted by you .

I will be highly thankful if you could please get me a hint of the codes .Its really hard for me .

Thankyou,,
 
Thamu Gurung
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Report post to moderator
please give me some hint to use that fileChannel()

I am really strucked in that .

Please help
 
Rob Spoor
Sheriff
Posts: 20827
68
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Report post to moderator
Let's continue in your new thread.
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!