Skip to main content

javafx.application.Application: how does it works?

3 replies [Last post]
Joined: 2008-06-08

I would to understand how work the 'Application' object. I was expecting log with the following code but nothing happened!!!

a idea?

nb6.1+pluging 2008-07-08

<br />
/*<br />
 * Main.fx<br />
 *<br />
 * Created on 28 juin 2008, 19:36:58<br />
<p>package jfxApplication;</p>
<p>import javafx.application.Application;<br />
import javafx.ext.swing.Canvas;<br />
import java.lang.System;<br />
import javafx.scene.Group;<br />
import javafx.scene.text.Text;<br />
import javafx.scene.Font;<br />
import javafx.scene.FontStyle;</p>
<p>Application{<br />
    content: Canvas {<br />
        content: [Text{<br />
                content: "Hello World!"<br />
                }]<br />
    }<br />
    onExit: function():Void{<br />
        System.out.println("onExit");<br />
<p>    onResume: function():Void{<br />
        System.out.println("onResume");<br />
<p>    onStart: function():Void{<br />
        System.out.println("onStart");<br />
<p>    onSuspend: function():Void{<br />
        System.out.println("onStart");<br />
    }<br />
}<br />

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2008-06-08

thx for these corrects answers

Joined: 2006-07-29

I didn't manage to run a javafx.application.Application with the Javafx NetBeans plugin. But I created a html page displaying the application like an applet using a jnlp file.

This is the applet html tag :

This is the applet-desc tag in the jnlp file :

May be another solution exists, but I don't know it ! Sorry.

Joined: 2007-07-12

The javafx.application.Application class is currently used for Applets.

To run it in NetBeans, right click on the file and select 'Run Applet'