JavaFX 2 TableView inserting rows directly on the

2019-06-11 05:30发布

Does the TableView Control in JavaFX 2 allow the insertion of new data right on the cells of the control?

I have not been able to find anything in that direction. Even the Oracle sample has separate textboxes and an ADD button outside of the control (like it was in the early 90's - yea, I've been programming for that long...)

1条回答
混吃等死
2楼-- · 2019-06-11 06:10

It's not really clear what do you want to achieve.

If you mean editing table values in place you can take a look at this tutorial: http://docs.oracle.com/javafx/2.0/ui_controls/table-view.htm

If you want to add new row by action on cell you can add context menu to cells by TableView.setContextMenu(context_menu); and implement adding new row "right on the cells".

查看更多
登录 后发表回答