Advertisement
Spirit13300

MAIN

Jun 17th, 2018
396
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.50 KB | None | 0 0
  1. package fr.univ_amu.iut;
  2.  
  3. import javafx.application.Application;
  4. import javafx.scene.input.KeyCombination;
  5.  
  6. import javafx.scene.Scene;
  7. import javafx.stage.Modality;
  8. import javafx.stage.Stage;
  9.  
  10.  
  11. public class Main extends Application {
  12.  
  13. /**
  14. * Méthode par défaut
  15. * @param args
  16. */
  17. public static void main(String[] args) {
  18. Application.launch(args);
  19. }
  20.  
  21. /**
  22. * Permet de charger la page d'Accueil
  23. * @param stage
  24. */
  25. @Override
  26. public void start(Stage stage){
  27.  
  28. Scene scene = new Scene(new AccueilController());
  29. stage.setScene(scene);
  30. stage.setTitle("Seek'n'Play");
  31. stage.setMaximized(true);
  32.  
  33. stage.setFullScreenExitKeyCombination(KeyCombination.NO_MATCH);
  34. stage.show();
  35. }
  36.  
  37. /**
  38. * Permet d'afficher les pages souhaitées
  39. * @param stage
  40. * @param scene
  41. */
  42. public static void startNewPage(Stage stage, Scene scene) {
  43. //scene.getStylesheets().addAll("/fr/univ_amu/iut/style.css");
  44. stage.setScene(scene);
  45. stage.setMaximized(true);
  46. stage.show();
  47. }
  48.  
  49. /**
  50. * Permet d'afficher la page Facebook
  51. * @param stage
  52. * @param scene
  53. */
  54. public static void startNewPage2(Stage stage, Scene scene) {
  55. stage.initModality(Modality.APPLICATION_MODAL);
  56. stage.setScene(scene);
  57. stage.setResizable(false);
  58. stage.centerOnScreen();
  59. stage.showAndWait();
  60. }
  61. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement