Login page
This commit is contained in:
25
ChatApp/app/src/main/java/client/ClientLogin.java
Normal file
25
ChatApp/app/src/main/java/client/ClientLogin.java
Normal file
@@ -0,0 +1,25 @@
|
||||
package client;
|
||||
|
||||
import javafx.fxml.FXML;
|
||||
import javafx.fxml.FXMLLoader;
|
||||
import javafx.scene.Scene;
|
||||
import javafx.scene.control.TextField;
|
||||
import javafx.stage.Stage;
|
||||
import client.ClientGui;
|
||||
import java.io.IOException;
|
||||
|
||||
import static utilities.FxUtilities.centerStage;
|
||||
|
||||
public class ClientLogin {
|
||||
@FXML
|
||||
public TextField usernameField;
|
||||
|
||||
@FXML
|
||||
private void login() throws IOException {
|
||||
var loader = new FXMLLoader(getClass().getResource("/client/clientLoading.fxml"));
|
||||
loader.load();
|
||||
Stage stage = (Stage) usernameField.getScene().getWindow();
|
||||
stage.setScene(new Scene(loader.getRoot(), 800, 600));
|
||||
centerStage(stage);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user