简体   繁体   中英

Editable JavaFX TableView with Objects

I'm trying to crete an editable TableView in JavaFX. I'm getting data from 2 joined tables, so I use objects in the Tableview.

private TableColumn<Student, Classroom>classroomNameColumn, classroomYearColumn;

I have set the table and columns to be editable, setEditable(true) , I tried to do setGraphic(node) (for example like a textfield) on setOnEditCommit action of the column.

I have not been able to resolve this issue.

So, how can I make a cell which contains an object editable? Thanks for all the answers

好吧,我的解决方案是创建一个自定义classclass继承自TableCell并覆盖编辑方法。

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