When I create a new JavaFX application in Netbeans 7.3 (and choose "Create Application Class") no such class is created. Not even the package for it -- just an empty default package.
I assume that I could just create it manually by extending the 'Application' class but maybe this behaviour is symptomatic of some setup anomaly.
Any idea why this happens? Btw, I had the same issue with Netbeans 7.1.
Cheers!
I cannot replicate your issue.
This works for me. In NetBeans 7.3:
Create a new JavaFX Project:
File | New Project | JavaFX | JavaFX Application
File | New Project | JavaFX | JavaFX Application
(click Next
)
Enter the project name, for example TestProject
(click `Finish):
The screen has a checked checkbox Create application class
. The default application class name will be testproject.TestProject
You can edit the default application class name to change it and the package it is located in if you like.
A skeleton Application class is created:
The TestProject
class extends Application
and resides in the testproject
package.
To create more applications in the same project:
Right click on the Project, choose:
New | Other | JavaFX | JavaFX Main Class (click Next
).
Enter a class name, for example NewFXMain
From the package drop down choose a project package, for example testproject
(click Finish
).
Another skeleton Application class is created:
The NewFXMain
class extends Application
and resides in the testproject
package.
The issue is resolved. Apparently, something must have messed up the environment when I installed the 7.3 and imported my previous 7.1 projects because many useful libraries were also missing. I reinstalled the 7.3 without bothering with importing anything from the previous version, and now everything works like a charm.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.