MCPcopy Create free account
hub / github.com/R4gd0ll/LazyAnFuZai / start

Method start

src/main/java/Main.java:15–29  ·  view source on GitHub ↗
(Stage primaryStage)

Source from the content-addressed store, hash-verified

13 }
14
15 public void start(Stage primaryStage) throws Exception {
16 Parent root = (Parent)FXMLLoader.load(ResourceUtil.getResource("fxml/Main.fxml"));
17 primaryStage.setTitle("LazyAnFuZai --by R4gd0ll");
18 try {
19 // 设置窗口图标
20 Image icon = new Image(getClass().getResourceAsStream("/icon.png"));
21 primaryStage.getIcons().add(icon);
22 } catch (NullPointerException e) {
23 System.out.println("无法加载图标文件");
24 }
25 Scene scene = new Scene(root, 1280.0, 910.0);
26 scene.getStylesheets().add(((URL)Objects.requireNonNull(Main.class.getResource("/css/main.css"))).toExternalForm());
27 primaryStage.setScene(scene);
28 primaryStage.show();
29 }
30
31 public static void main(String[] args) {
32 launch(args);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected