From e5e16c06118f9c71e624a79a936c3c164ef4217c Mon Sep 17 00:00:00 2001 From: mohammadreza Date: Wed, 24 Jun 2026 13:27:00 +0330 Subject: [PATCH] feat: initialize JavaFX login window --- .../university/chat/Client/UI/ChatApp.java | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 src/main/java/com/university/chat/Client/UI/ChatApp.java diff --git a/src/main/java/com/university/chat/Client/UI/ChatApp.java b/src/main/java/com/university/chat/Client/UI/ChatApp.java new file mode 100644 index 0000000..7f3719f --- /dev/null +++ b/src/main/java/com/university/chat/Client/UI/ChatApp.java @@ -0,0 +1,28 @@ +package com.university.chat.Client.UI; + + +import javafx.application.Application; +import javafx.fxml.FXMLLoader; +import javafx.scene.Scene; +import javafx.stage.Stage; +import javafx.stage.StageStyle; + +import java.io.IOException; + +public class ChatApp extends Application { + + @Override + public void start(Stage stage) throws IOException { + FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("login.fxml")); + Scene scene = new Scene(fxmlLoader.load()); + scene.getStylesheets().add( + getClass().getResource("/chat_style.css").toExternalForm() + ); + + stage.setTitle("Login"); + stage.initStyle(StageStyle.UNDECORATED); + stage.setScene(scene); + stage.show(); + } + +}