Populate TableView with ObservableMap [message #1823424] |
Thu, 26 March 2020 07:51  |
Eclipse User |
|
|
|
Hi,
I have a ConcurrentHashMap that takes dinamically data from a JMS tail.
Then I need to populate a TableView with the data of the ConcurrentMap.
--
My idea is to use an ObservableMap that is populated by the ConcurrentHashMap.
1) How can I control if the data are dinamically passed from the Concurrent to the Observed?
My solution is:
ObservableMap<String, SystemTarget> entriesTarget= FXCollections.observableMap(targetMap);
2) How can I control if the rows number is changed in relation to the ObservableMap update?
My solution:
ObservableList<SystemTarget> obsList = FXCollections.observableArrayList(entriesTarget.values());
table.setItems(obsList);
Then,
I can see the rows, but they are not changed......
What am I doing wrong?
Thanks!!
|
|
|
|
Powered by
FUDForum. Page generated in 0.03104 seconds