package polling_station_dashboard.java; import javafx.fxml.FXMLLoader; import javafx.scene.Parent; import javafx.scene.Scene; import javafx.stage.Stage; import java.io.IOException; /** * Created by Vladimir Eliezer Tokarev on 28/05/2016 * This class loads the polling station fxml */ public class PollingStationDashboardLoader { private static final String POLLING_STATION_DASHBOARD_FXML_PATH = "../fxml/status_log.fxml"; private Stage currentStage; public PollingStationDashboardLoader (Stage primaryStage) throws IOException { currentStage = primaryStage; FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource(POLLING_STATION_DASHBOARD_FXML_PATH)); Parent root = fxmlLoader.load(); PollingStationDashboardController controller = fxmlLoader.getController(); currentStage.setTitle("Polling Station Dashboard"); currentStage.setScene(new Scene(root, 850, 615)); currentStage.show(); controller.SetStage(currentStage); } }