-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPokeAppMain.java
More file actions
35 lines (32 loc) · 1.01 KB
/
Copy pathPokeAppMain.java
File metadata and controls
35 lines (32 loc) · 1.01 KB
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
31
32
33
34
35
import javafx.application.Application;
import javafx.scene.image.Image;
import javafx.stage.Stage;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.util.*;
import java.util.*;
public class PokeAppMain extends Application
{
public static void main(String[] args) {
launch(args);
}
@Override
public void start(Stage stage) throws Exception
{
// Load the GUI from FXML built in Scene Builder
Parent root = FXMLLoader.load(Objects.requireNonNull(getClass().getResource("PokeApp.fxml")));
Scene scene = new Scene(root);
stage.setTitle("PokePics App");
stage.getIcons().add(new Image("pokeballicon.png"));
// The stylesheet is currently set in Scene Builder
// Note you can also load this programmatically
// scene.getStylesheets().add("styles.css");
stage.setScene(scene);
stage.show();
}
@Override
public void stop() {
System.out.println("Stop is called in Application class");
}
}