Dennis Ich
Dennis Ich

Reputation: 3775

JTables with Buttons to delete things

i have several Tables which display things like products which are saved in a database. So to get this products displayed i get a list from the database and give the list to the tablemodel.

Now i want a delete button in every row with which i can delete the product from the database.

Are there some good ways to do this? Right now i have implemented something that feels wrong. I have custom button which saves its row when its initialized and that makes a callback from the table (custom class extending jtable) to the view which then calls the controller to delete the entry from DB.

Upvotes: 0

Views: 175

Answers (1)

tenorsax
tenorsax

Reputation: 21223

Check out Table Button Column by @camickr.

Upvotes: 4

Related Questions