Java FX 8 - Tableview Display Objects Within Objects

最后都变了- 提交于 2019-12-04 14:56:12

Thanks for the tip, I got it working by overriding the call method which is able to access the client object. Then I was able to access the Address Object and return a SimpleStringProperty and update each column appropriately.

addressColumn1.setCellValueFactory(new Callback<CellDataFeatures<Client, String>, ObservableValue<String>>() {
        @Override
        public ObservableValue<String> call(CellDataFeatures<Client, String> c) {
            return new SimpleStringProperty(c.getValue().getAddress().getA1());                
        }
}); 
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!