Skip to content

Commit

Permalink
put login-view.fxml in resources
Browse files Browse the repository at this point in the history
  • Loading branch information
Sciaopersone committed Feb 22, 2024
1 parent 9a04a7e commit 02c23a8
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/team/elrant/bubbles/gui/LoginApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@
import javafx.fxml.FXMLLoader;
import javafx.scene.Scene;
import javafx.stage.Stage;

import java.io.IOException;

public class LoginApplication extends Application {
@Override
public void start(@org.jetbrains.annotations.NotNull Stage stage) throws IOException {
FXMLLoader fxmlLoader = new FXMLLoader(LoginApplication.class.getResource("login-view.fxml"));
FXMLLoader fxmlLoader = new FXMLLoader(LoginApplication.class.getResource("/login-view.fxml"));
Scene scene = new Scene(fxmlLoader.load(), 320, 240);
stage.setTitle("Login");
stage.setScene(scene);
Expand Down
27 changes: 27 additions & 0 deletions src/main/resources/login-view.fxml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>

<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<?import javafx.scene.text.*?>

<Pane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="183.0" prefWidth="257.0" xmlns="http://javafx.com/javafx/17.0.2-ea" xmlns:fx="http://javafx.com/fxml/1" fx:controller="team.elrant.bubbles.gui.LoginController">
<Label layoutX="14.0" layoutY="61.0" text="Username">
<font>
<Font name="Segoe UI Semibold" size="12.0"/>
</font>
</Label>
<TextField fx:id="username_field" layoutX="94.0" layoutY="57.0" promptText="MarioRossi"/>
<Label layoutX="15.0" layoutY="95.0" text="Password">
<font>
<Font name="Segoe UI Semibold" size="12.0"/>
</font>
</Label>
<PasswordField fx:id="password_field" layoutX="94.0" layoutY="91.0" promptText="********"/>
<Label alignment="CENTER" contentDisplay="CENTER" maxWidth="-Infinity" minWidth="-Infinity" prefHeight="44.0"
prefWidth="257.0" text="Login" textAlignment="CENTER">
<font>
<Font name="Segoe UI Semibold" size="25.0"/>
</font>
</Label>
<Button layoutX="191.0" layoutY="144.0" mnemonicParsing="false" onAction="#onSubmitButtonClick" text="Submit"/>
</Pane>

0 comments on commit 02c23a8

Please sign in to comment.