Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to use CheckBoxTableCell

ericCDec 28 2012 — edited Dec 28 2012
Hi All,

I would like to have editable checkbox in a table.

That's what I have now.

TableColumn selectCol = new TableColumn("Select");
selectCol.setEditable(true);
selectCol.setCellValueFactory(
new PropertyValueFactory<OrderCheck, Boolean>("selected"));
selectCol.setCellFactory(CheckBoxTableCell.forTableColumn(selectCol));

Issues
1) It always display unchecked checkbox no matter the "selected" value in the object
2) How does "selected" value got updated after checkbox is selected or unselected?

Thanks.

Edited by: ericC on Dec 27, 2012 10:06 PM
This post has been answered by James_D on Dec 28 2012
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 25 2013
Added on Dec 28 2012
2 comments
12,597 views