AlanBMatthews opened a new issue, #4812:
URL: https://github.com/apache/netbeans/issues/4812
### Apache NetBeans version
Apache NetBeans 15
### What happened
NetBeans failed to produce a build when following a tutorial example to
create a simple javafx application using SceneBuilder to construct the FXML
file.
The FXMLController class was unable to detect an instance of the components
defined within the FXML file.
The problem appears to have 3 contributors.
1. Within the FXMain class of the example the FXMLLoader was a static class
object.
2. FXML.fxml resides in package directory.
3. SceneBuilder produces component identities by prefacing with id= e.g.
id=label1.
The solution was to:
1. Create an instance of FXMLoader within FXMain.
3. Modify instances of id=<component id> to fx:id=<component id>
4. Copy FXML.fxml to class directory (<project>/build/classes/<package>
[FXMain
.java.txt](https://github.com/apache/netbeans/files/9811859/FXMain.java.txt)
[FXML.fxml.txt](https://github.com/apache/netbeans/files/9811880/FXML.fxml.txt)
[FXMLController.java.txt](https://github.com/apache/netbeans/files/9811887/FXMLController.java.txt)
### How to reproduce
As described above.
### Did this work correctly in an earlier version?
No / Don't know
### Operating System
Ubuntu 20.04.1 LTS(Jammy JellyFish)64-bit;Kernel Linux 15.5.0-50 generic
x86_64; MATE 1.26.0
### JDK
java version "19" 2022-09-20 Java(TM) SE Runtime Environment (build
19+36-2238) Java HotSpot(TM) 64-Bit Server VM (build 19+36-2238, mixed mode,
sharing)
### Apache NetBeans packaging
Apache NetBeans platform
### Anything else
_No response_
### Are you willing to submit a pull request?
Yes
### Code of Conduct
Yes
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists