The tutorial is for Java Ant Application, we can integrate JavaFX in Netbeans 
Java Ant Application.
Now, we can not integrated JavaFX for Netbeans Platform Application
















在 2022-01-19 21:50:47,"Jean-Marc Borer" <jmbo...@gmail.com> 写道:

Have a look here. There is a JavaFX tutorial. 
https://netbeans.apache.org/kb/docs/java/index.html



On Fri, Jan 14, 2022 at 11:08 AM wdh_456 <wdh_...@163.com> wrote:

Thank you very much, I will try this way.







发自我的小米手机
在 Giovanni Dal Maso <dalm...@ttsnetwork.com>,2022年1月14日 下午6:05写道:


We had similar problems and in the end it was better to switch to maven.

Just create your Netbeans Platform Application using “Java with Maven” > 
“NetBeans Application” and add JavaFX as a maven dependency to the module that 
requires it.

 

For example, add the following to the <dependencies> inside the pom.xml of the 
NB Module:

        <dependency>

            <groupId>org.openjfx</groupId>

            <artifactId>javafx-controls</artifactId>

            <version>17.0.1</version>

        </dependency>

        <dependency>

            <groupId>org.openjfx</groupId>

            <artifactId>javafx-fxml</artifactId>

            <version>17.0.1</version>

        </dependency>

        <dependency>

            <groupId>org.openjfx</groupId>

            <artifactId>javafx-swing</artifactId>

            <version>17.0.1</version>

        </dependency>

 

HTH

 

 

From:王东华 <wdh_...@163.com>
Sent: giovedì 13 gennaio 2022 09:26
To:users@netbeans.apache.org
Subject: Netbeans IDE 12.6/JavaFX 17/Java 11

 

Dear,

Our development environment: Netbeans IDE 12.6, JavaFX 17, Java 11

I have create a Netbeans Platform Application and want to use JavaFX,

I have add JavaFX jar into the wrapped jars, and there are no compile error for 
JavaFX in Netbeans IDE,

However, when I run the application, IDE will show following exception:

java.lang.RuntimeException: No toolkit found

            at com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:276)

            at 
com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:291)

            at 
com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:163)

            at javafx.embed.swing.JFXPanel.lambda$initFx$1(JFXPanel.java:225)

[catch] at java.base/java.lang.Thread.run(Thread.java:829)

And I don't know how to add -module-path and --add-modules for Netbeans 
Platform Application

 

 

--------------------------------------------------------------------- To 
unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org For additional 
commands, e-mail: users-h...@netbeans.apache.org For further information about 
the NetBeans mailing lists, visit: 
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to