Advertisement
Guest User

Untitled

a guest
Mar 18th, 2019
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.94 KB | None | 0 0
  1. package controllers;
  2.  
  3. import javafx.event.ActionEvent;
  4. import javafx.fxml.FXML;
  5. import javafx.fxml.FXMLLoader;
  6. import javafx.scene.Node;
  7. import javafx.scene.Parent;
  8. import javafx.scene.Scene;
  9. import javafx.stage.Stage;
  10.  
  11. import java.io.IOException;
  12.  
  13. public class SignInViewController {
  14.  
  15.     @FXML private javafx.scene.control.Button closeButton;
  16.     @FXML private javafx.scene.control.Button signInButton;
  17.  
  18.     @FXML private void closeButtonAction(){
  19.         Stage stage = (Stage) closeButton.getScene().getWindow();
  20.         stage.close();
  21.     }
  22.  
  23.  
  24.     @FXML private void signInAction(ActionEvent event)throws IOException {
  25.         Parent view2 = FXMLLoader.load(getClass().getClassLoader().getResource("viewsFxml/klient/clientView.fxml"));
  26.  
  27.         Scene scene2 = new Scene(view2);
  28.  
  29.         Stage window = (Stage)((Node)event.getSource()).getScene().getWindow();
  30.         window.setScene(scene2);
  31.         window.show();
  32.     }
  33.  
  34.  
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement