Skip to content
Snippets Groups Projects
Commit 63323319 authored by Haverinen Elias Viljami's avatar Haverinen Elias Viljami
Browse files

ikkunat saatu vihdoin näkymään kun napeista painetaan

parent 5225c151
No related branches found
No related tags found
No related merge requests found
......@@ -7,6 +7,7 @@ import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader;
import javafx.scene.Scene;
import javafx.stage.Modality;
import javafx.stage.Stage;
import javafx.scene.control.MenuItem;
import javafx.scene.layout.Pane;
......@@ -47,20 +48,44 @@ public class VuororekisteriGUIController {
public void avaaikkuna(MenuItem avattava) {
///ModalController.showModal(LajinLisaysMain);
/// pitäisi saada jotenkin ne muut ikkunat näkymään.
try {
FXMLLoader ldr = new FXMLLoader(getClass().getResource("/fxLajinLisays/LajinLisaysGUIView.fxml"));
final Pane root = ldr.load();
//final LajinLisaysGUIController lajinlisaysCtrl = (LajinLisaysGUIController)ldr.getController();
Scene scene = new Scene(root);
scene.getStylesheets().add(getClass().getResource("lajinlisays.css").toExternalForm());
Stage.setScene(scene);
Stage.setTitle("LajinLisays");
Stage.show();
} catch (Exception e) {
e.printStackTrace();
if (avattava == menuLisaaLaji) {
try {
FXMLLoader ldr = new FXMLLoader(getClass().getResource("/fxLajinLisays/LajinLisaysGUIView.fxml"));
final Pane root = ldr.load();
Scene scene = new Scene(root);
//final LajinLisaysGUIController lajinlisaysCtrl = (LajinLisaysGUIController)ldr.getController();
Stage stage = new Stage();
stage.initModality(Modality.APPLICATION_MODAL);
///stage.getStylesheets().add(getClass().getResource("lajinlisays.css").toExternalForm());
stage.setScene(scene);
stage.setTitle("LajinLisays");
stage.show();
} catch (Exception e) {
e.printStackTrace();
}
}
if (avattava == menuLisaaVuoro || avattava == menuMuokkaaVuoroa) {
try {
FXMLLoader ldr = new FXMLLoader(getClass().getResource("/fxLisaaMuokkaaVuoro/LisaaMuokkaaVuoroGUIView.fxml"));
final Pane root = ldr.load();
Scene scene = new Scene(root);
//final LajinLisaysGUIController lajinlisaysCtrl = (LajinLisaysGUIController)ldr.getController();
Stage stage = new Stage();
stage.initModality(Modality.APPLICATION_MODAL);
///stage.getStylesheets().add(getClass().getResource("lajinlisays.css").toExternalForm());
stage.setScene(scene);
stage.setTitle("LajinLisays");
stage.show();
} catch (Exception e) {
e.printStackTrace();
}
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment