-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHelloFX.java
More file actions
30 lines (23 loc) · 813 Bytes
/
HelloFX.java
File metadata and controls
30 lines (23 loc) · 813 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package com.example;
import io.github.cdimascio.dotenv.Dotenv;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.image.Image;
import javafx.stage.Stage;
public class HelloFX extends Application {
@Override
public void start(Stage stage) throws Exception {
FXMLLoader fxmlLoader = new FXMLLoader(HelloFX.class.getResource("hello-view.fxml"));
Parent root = fxmlLoader.load();
Scene scene = new Scene(root, 540, 650);
stage.setTitle("CatCode Messenger");
stage.getIcons().add(new Image(getClass().getResourceAsStream("/coolCat.png")));
stage.setScene(scene);
stage.show();
}
public static void main(String[] args) {
launch();
}
}