简体   繁体   中英

How to add button to row of JTable?

I have a Swing based application containing a JTable . Now I would like to allow each row to be updated or deleted, using a unique row ID. So I want to add an update and delete button to each row, which have the capability to support an ActionListener. However, I have no idea how to do this using NetBeans.

Check out Table Button Column for one approach. The code supports the custom renderer and editor that you will need for the column to display your text as a button.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM