package fx.com;

import javafx.application.Application;
import javafx.application.ConditionalFeature;
import javafx.application.Platform;
import javafx.stage.Stage;

public class Main extends Application {
    public static void main(String[] args) {
        launch(args);
    }
    @Override
    public void start(Stage primaryStage) throws Exception {

        Platform.setImplicitExit(false);
        primaryStage.show();
        // 检查是否支持某种特性
        System.out.println(Platform.isSupported(ConditionalFeature.SCENE3D));
        // 必须调用Platform.exit()程序才能退出
        Platform.exit();

        // 延时加载
        Platform.runLater(new Runnable() {
            @Override
            public void run() {
                System.out.println(Thread.currentThread().getName());
            }
        });
    }
}

相关文章:

  • 2022-12-23
  • 2021-06-16
  • 2021-12-19
  • 2021-06-07
  • 2021-07-30
  • 2021-09-10
  • 2022-01-09
  • 2021-04-22
猜你喜欢
  • 2022-12-23
  • 2021-04-18
  • 2022-01-18
  • 2021-06-21
  • 2021-05-14
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案