Added base start for javafx setup.
This commit is contained in:
parent
53d046858f
commit
2714b23dab
26
src/main/java/Assignments/A1/GUIDriver.java
Normal file
26
src/main/java/Assignments/A1/GUIDriver.java
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
package Assignments.A1;
|
||||||
|
|
||||||
|
import javafx.application.Application;
|
||||||
|
import javafx.fxml.FXMLLoader;
|
||||||
|
import javafx.scene.Parent;
|
||||||
|
import javafx.scene.Scene;
|
||||||
|
import javafx.stage.Stage;
|
||||||
|
|
||||||
|
public class GUIDriver extends Application {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void start(Stage stage) throws Exception {
|
||||||
|
Parent root = FXMLLoader.load(getClass().getResource("/A1/view/BoardView.fxml"));
|
||||||
|
|
||||||
|
Scene scene = new Scene(root);
|
||||||
|
scene.getStylesheets().add(getClass().getResource("A1/view/styles.css").toExternalForm());
|
||||||
|
|
||||||
|
stage.setTitle("JavaFX and Maven");
|
||||||
|
stage.setScene(scene);
|
||||||
|
stage.show();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void main(String[] args) {
|
||||||
|
launch(args);
|
||||||
|
}
|
||||||
|
}
|
9
src/main/java/Assignments/A1/GUILauncher.java
Normal file
9
src/main/java/Assignments/A1/GUILauncher.java
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
package Assignments.A1;
|
||||||
|
|
||||||
|
public class GUILauncher {
|
||||||
|
|
||||||
|
public static void main(final String[] args) {
|
||||||
|
GUIDriver.main(args);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
0
src/main/resources/A1/view/BoardView.fxml
Normal file
0
src/main/resources/A1/view/BoardView.fxml
Normal file
0
src/main/resources/A1/view/styles.css
Normal file
0
src/main/resources/A1/view/styles.css
Normal file
Loading…
Reference in New Issue
Block a user