Add pom.xml and set up jar packaging
FXML loading needed to change when resources were packaged in jar.
This commit is contained in:
@ -62,7 +62,7 @@ public class Main extends Application {
|
||||
|
||||
try {
|
||||
if (startParams.notification().isPresent()){
|
||||
FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("NotificationView.fxml"));
|
||||
FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("/NotificationView.fxml"));
|
||||
Parent root = fxmlLoader.load();
|
||||
|
||||
NotificationController controller = fxmlLoader.getController();
|
||||
@ -72,7 +72,7 @@ public class Main extends Application {
|
||||
primaryStage.setScene(new Scene(root));
|
||||
primaryStage.show();
|
||||
} else {
|
||||
FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("MainView.fxml"));
|
||||
FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("/MainView.fxml"));
|
||||
Parent root = fxmlLoader.load();
|
||||
|
||||
MainController controller = fxmlLoader.getController();
|
||||
|
@ -66,7 +66,7 @@ public class MainController implements Initializable {
|
||||
private void handleStationSettingsButtonPress() {
|
||||
if (settingsStage == null || !settingsStage.isShowing()) {
|
||||
try {
|
||||
FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("StationSettingsView.fxml"));
|
||||
FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("/StationSettingsView.fxml"));
|
||||
Parent root = fxmlLoader.load();
|
||||
|
||||
StationSettingsController controller = fxmlLoader.getController();
|
||||
@ -101,7 +101,7 @@ public class MainController implements Initializable {
|
||||
private void handleSelectStationButtonPress() throws Exception {
|
||||
if (selectStationStage == null || !selectStationStage.isShowing()) {
|
||||
try {
|
||||
FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("StationSelectionView.fxml"));
|
||||
FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("/StationSelectionView.fxml"));
|
||||
Parent root = fxmlLoader.load();
|
||||
|
||||
StationSelectionController controller = fxmlLoader.getController();
|
||||
|
@ -357,7 +357,7 @@ public class StationSettingsController {
|
||||
@FXML
|
||||
private void handleAddPrefixButtonPress() {
|
||||
try {
|
||||
FXMLLoader loader = new FXMLLoader(getClass().getResource("AddPrefixView.fxml"));
|
||||
FXMLLoader loader = new FXMLLoader(getClass().getResource("/AddPrefixView.fxml"));
|
||||
Parent root = loader.load();
|
||||
|
||||
AddPrefixController controller = loader.getController();
|
||||
|
Reference in New Issue
Block a user