![]() The private Button button2 declaration and the declaration for the new method, handleActionButton2, are created in the controller source file, FXMLDocumentController.java. ![]() Notice there is an error badge to indicate that the handleButtonAction2 is undefined.įrom the IDE's main menu, select Source and then Make Controller. In NetBeans IDE, right click the node for the FXMLDocument.fxml file that you just edited, if it is not already opened, and select Edit from the contextual menu. ![]() Select File in the main menu and then Save. In the Code panel on the right side of the window, type button2 for the new button's fx:id field and a new method name, handleButtonAction2, for the onAction method. In the Scene Builder window, drag another Button control from the Library panel to the Content panel. To illustrate this feature, do the following: The NetBeans IDE's Make Controller feature allows you to synchronize the modifications you make in the FXML file that is currently opened in Scene Builder and the controller source code opened in NetBeans IDE. Synchronizing With the Controller Source Code ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |