Login page

This commit is contained in:
Clément
2025-03-05 18:08:26 +01:00
parent 6d228aee55
commit 5cefe42a99
4 changed files with 77 additions and 2 deletions

View File

@@ -0,0 +1,17 @@
package utilities;
import javafx.stage.Screen;
import javafx.stage.Stage;
public class FxUtilities {
public static void centerStage(Stage stage) {
double screenWidth = Screen.getPrimary().getVisualBounds().getWidth();
double screenHeight = Screen.getPrimary().getVisualBounds().getHeight();
double xPos = screenWidth / 2 - stage.getWidth() / 2;
double yPos = screenHeight / 2 - stage.getHeight() / 2;
stage.setX(xPos);
stage.setY(yPos);
}
}