-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.java
44 lines (32 loc) · 1014 Bytes
/
App.java
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
36
37
38
39
40
41
42
43
44
package lsb;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.stage.Stage;
import java.io.IOException;
public class App extends Application {
private static Scene scene;
private static Stage primaryStage;
@Override
public void start(Stage stage) throws Exception{
primaryStage = stage;
scene = new Scene(loadFXML("main"));
stage.setTitle("LSB Steganography");
stage.setScene(scene);
stage.show();
}
static void setRoot(String fxml) throws IOException {
scene.setRoot(loadFXML(fxml));
}
private static Parent loadFXML(String fxml) throws IOException {
FXMLLoader fxmlLoader = new FXMLLoader(App.class.getResource(fxml + ".fxml"));
return fxmlLoader.load();
}
public static void main(String[] args) {
launch(args);
}
public static Stage getPrimaryStage() {
return primaryStage;
}
}