java - How is the Stage instantiated in this JavaFX sample code?
问题描述
This is a simple JavaFX starting point.
DemoApp inherits from Application. Application has an abstract method and that needs to be implemented. That's the @Overriden one.
The thing that confuses me is the parameter of the method. It has a class type and a name. Right?
But how did the name "stage" get instantiated to create an object if there is no = new Stage();" ? It is only "Stage stage" and not "Stage stage = new Stage();"
public class DemoApp extends Application {
@Override
public void start(Stage stage) throws Exception {
}
}
解决方案
推荐阅读
- javascript - 使行可点击,除了复选框
- java - 如何使用 Spring Boot 在 Java 中测试 Dropbox 上传?
- sql - 不存在执行所需分组和聚合的函数
- google-cloud-platform - GCP GCE F1-micro 不是免费的?
- c# - 启动本机 WindowsApp 返回拒绝访问
- javascript - Chrome 扩展 - 访问 IndexedDB 的后台脚本(无存储)
- python - Pygame 窗口打不开
- c++ - Bazel:相对本地路径作为 http_archive() 中的 url
- powershell - ImportSystemModules 的目的是什么?
- python - 对 django 关系感到困惑