I am learning Javafx and wondering why this calling launch(args)
in this code:
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.stage.Stage;
import javafx.scene.control.Button;
public class Gui extends Application{
@Override
public void start(Stage primaryStage){
Button btn = new Button("OK");
Scene scene = new Scene(btn, 200, 250);
primaryStage.setTitle("My First GUI");
primaryStage.setScene(scene);
primaryStage.show();
primaryStage.setResizable(true);
}
public static void main(String[] args) {
Application.launch(args);
}
}
is equivalent when we call
launch(args);
I've searched and found this answer "the JavaFX main class is a subtype of Application." but I can't understand it.