Showing posts with label Developer. Show all posts
Showing posts with label Developer. Show all posts

Hello World, JavaFX Style

Hello World, JavaFX Style

 

The best way to teach you what it is like to create and build a JavaFX application is with a ”Hello World” application. An added benefit of this tutorial is that it enables you to test that your JavaFX technology is properly installed.

The tool used in this tutorial is NetBeans IDE 8.0 Before you begin, ensure that the version of NetBeans IDE that you are using supports JavaFX 8.

Construct the Application

  1. From the File menu, choose New Project.
  2. In the JavaFX application category, choose JavaFX Application. Click Next.
  3. Name the project HelloWorld and click Finish.


Class Name and File Name




Name's Class Public class doesn't mismatch with File's Name



Cada archivo .java que creamos a la hora de programar puede contener sólo una Clase pública. El nombre de esa Clase pública debe coincidir exactamente con el nombre del archivo previamente creado, sabiendo que java es Strongly Typed y distingue las mayúsculas y minúsculas. Por ejemplo, una Clase pública llamada MyConfig debe estar en un archivo llamado MyConfig.java

  • con esto evitamos tener un Error de sintaxis.