feat: initialize JavaFX login window
This commit is contained in:
@@ -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();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user