I have an existing Java project in Netbeans that uses Swing and I would like to start using Java FX 2.0 for some components in that project.
I have dowloaded the latest version of the JDK (1.7.0_03) and enabled JavaFX but when I try adding an import javafx.xxx
statement, Netbeans can't resolve the link. Do I need to manually add some JARs to my list of external libraries?
Project Properties use "JDK 1.7-FX Enabled":
which is configured this way:
Click on the File menu and select Project Structure . In the dialog that appears, select the Libraries tab and click the + icon to add a new Java library: Find your javafx-sdk folder and select the lib subfolder: Click the OK button to complete the process.
Right-click the Libraries folder in your project, select the Add Library... command, then choose JavaFX 13 from the list of global libraries. If you don't have that library, then you need to go back to the previous section. Finally, add a new JavaFX Main Class... to the project's package.
Tools -> Plugins -> Installed (Tab) -> Select JavaFX plugins and click on Activate them. JavaFX has been enabled in my NetBeans. Save this answer.
This tutorial provides step-by-step instructions for integrating JavaFX features into a NetBeans Platform application. Since the NetBeans Platform is typically used as a basis for corporate applications, the JavaFX chart components are ideal candidates for integration into NetBeans Platform applications.
If you created your project in older NetBeans it can miss libraries from FX enabled plaftorm.
You can:
C:/Program Files/Oracle/JavaFX 2.0 SDK/rt/lib/jfxrt.jar
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With