简体   繁体   中英

JavaFX SceneBuilder Controller

I'm following the tutorial for creating a new JavaFX application with SceneBuilder and I'm trying to add a controller class to the .fxml file.

https://docs.oracle.com/javafx/scenebuilder/1/get_started/bind-ui-to-logic.htm

However, in the "code" section as described in the tutorial, the controller class text field doesn't exist!

I am using Eclipse with Gluon's version of Scene Builder v 8.1.1.

Where can I connect my .fxml file to my controller Java class?

JavaFX scene builder 2: controller class

Turns out, they moved the controller class field. Oracle's documentation is wayy outdated. Thanks to @MhmdAljobairi who pointed out that it's actually on the left side of the window, tucked away in the expandable lists.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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