diff --git a/ChatApp/app/src/main/java/client/ClientLoading.java b/ChatApp/app/src/main/java/client/ClientLoading.java
index aa59293..cb98540 100644
--- a/ChatApp/app/src/main/java/client/ClientLoading.java
+++ b/ChatApp/app/src/main/java/client/ClientLoading.java
@@ -2,18 +2,32 @@ package client;
import javafx.animation.RotateTransition;
import javafx.fxml.FXML;
+import javafx.fxml.FXMLLoader;
+import javafx.scene.Scene;
import javafx.scene.shape.Arc;
+import javafx.stage.Stage;
import javafx.util.Duration;
+import java.io.IOException;
+import static utilities.FxUtilities.centerStage;
+
public class ClientLoading {
@FXML
private Arc spinnerArc;
- public void initialize() {
+ public void initialize() throws IOException, InterruptedException {
// Création de l'animation de rotation
RotateTransition rotate = new RotateTransition(Duration.seconds(1), spinnerArc);
rotate.setByAngle(360);
rotate.setCycleCount(RotateTransition.INDEFINITE);
rotate.play();
}
+
+ public void login() throws IOException {
+ var loader = new FXMLLoader(getClass().getResource("/client/clientVue.fxml"));
+ loader.load();
+ Stage stage = (Stage) spinnerArc.getScene().getWindow();
+ stage.setScene(new Scene(loader.getRoot(), 800, 600));
+ centerStage(stage);
+ }
}
diff --git a/ChatApp/app/src/main/resources/client/clientLoading.fxml b/ChatApp/app/src/main/resources/client/clientLoading.fxml
index 5c5ce8e..8d57d72 100644
--- a/ChatApp/app/src/main/resources/client/clientLoading.fxml
+++ b/ChatApp/app/src/main/resources/client/clientLoading.fxml
@@ -7,6 +7,6 @@
\ No newline at end of file
diff --git a/ChatApp/app/src/main/resources/client/clientVue.fxml b/ChatApp/app/src/main/resources/client/clientVue.fxml
index 6830bc8..9821bc5 100644
--- a/ChatApp/app/src/main/resources/client/clientVue.fxml
+++ b/ChatApp/app/src/main/resources/client/clientVue.fxml
@@ -7,15 +7,39 @@
+
+
-
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+