How to implement a JavaFX table with multiple TableViews and Cell Factories? -
i have table list of visible items filtered radio buttons @ top of table. let's radio buttons a, b, c - if if chosen table show items of type a, if b chosen show type b, etc.
i create separate tableview instance each selection because users interacting these filtered values in table , editing values etc. have custom cell factory each column in table because rows need highlighted/frozen according user input.
so:
for (all values a.. c) { createnewtableview(); } private void createnewtableview() { tableview tableview = new tableview(); ... mycustomcellfactory customcf = new mycustomcellfactory(); customcf.settableview(tableview); clmn1.setcellfactory(customcf); ... }
my problem when custom cell factory fires, through tell instance of table view belongs to, table view instance not correct one. it's last 1 created. i've verified checking instance id's.
so question how can have multiple table view instances custom cell factories , ensure i'm acting on right 1 in custom cell factory code?
thanks!
the problem had not instantiating table columns each instance of tableview. posted simpler example here - javafx tabbed pane table view on each tab? - , got answer needed.
Comments
Post a Comment