简体   繁体   English

如何在JavaFX中查找具有ID的元素?

[英]How to find an element with an ID in JavaFX?

I have an element with the ID history type of TableView . 我有一个具有TableView的ID history类型的元素。 How can I find and access this object if I have the instance of Scene scene ? 如果我有Scene scene的实例,我如何找到并访问此对象?

尝试

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM