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());
}
});
}
}