How to find an element with an ID in JavaFX?

JavaJavafx

Java Problem Overview


I have an element with the ID history type of TableView. How can I find and access this object if I have the instance of Scene scene?

Java Solutions


Solution 1 - Java

Try

TableView tb = (TableView) scene.lookup("#history");

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionTowerView Question on Stackoverflow
Solution 1 - JavaUluk BiyView Answer on Stackoverflow