package fx.com;

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

public class Main3 extends Application {
    public static void main(String[] args) {
        System.out.println("Main():"+Thread.currentThread().getName());
        Application.launch(Main3.class,args);
    }

    @Override
    public void init() throws Exception {
        System.out.println("Init():"+Thread.currentThread().getName());
    }

    @Override
    public void start(Stage primaryStage) throws Exception {
        System.out.println("Start():"+Thread.currentThread().getName());
        primaryStage.setTitle("Hello World");
        primaryStage.show();
    }

    @Override
    public void stop() throws Exception {
        System.out.println("Stop():"+Thread.currentThread().getName());
    }
}

JavaFx:2、application的启动方式和生命周期

相关文章:

  • 2021-07-11
  • 2021-07-15
  • 2021-04-27
  • 2021-11-26
  • 2021-11-02
  • 2022-12-23
  • 2021-11-18
  • 2021-08-09
猜你喜欢
  • 2021-05-25
  • 2021-04-19
  • 2021-09-13
  • 2021-05-12
相关资源
相似解决方案