JavaFX script can be managed in a logical manner similar to packages in Java. If a script is not put in any package, than it goes into default package. It's not a good practice to put the scripts in default package. Defining a package is similar to creating a new directory in the source. The package can nested into each other. To create a package, let's create folder com and inside that folder create lalit. So the package is com.lalit. Any class defined inside that package will contain the package declaration the top.
package com.lalit;
public class TestScript{
//
}
when we want to use the definition, we will have to import it
No comments:
Post a Comment