문제

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.

도움이 되었습니까?

해결책

Check out Table Button Column by @camickr.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top