Forum Stats

  • 3,825,999 Users
  • 2,260,586 Discussions


Java Puzzle Ball - Lab 4

OTG-467455 Member Posts: 506 Bronze Badge
edited Nov 27, 2017 3:34PM in Java Puzzle Ball

The code contains a list of API imports.   I notice that the public class NewFXMain extends Application.  So would I be correct in saying that this uses the import javafx.application.Application as a template and then modifies its behaviour or adding additional functionality.


  • NickR2600-Oracle
    NickR2600-Oracle Member Posts: 530 Employee
    edited Nov 27, 2017 3:34PM

    In this case, Application is an abstract super class.  It contains one abstract method, start, which must be implemented by the JavaFX main class.  start is like the main method for JavaFX applications.  In fact, this inheritance structure is so crucial to JavaFX projects, NetBeans automatically creates it when you start a new JavaFX project.

    If you're curious, NetBeans offers a shortcut to inspect any particular class, like Application. Hold ctrl and click Application.