Registrierungsszwnenwechsel angepasst

This commit is contained in:
Kevin Maier 2023-01-31 16:20:51 +01:00
parent e2de2b7383
commit 8a03439ab6
5 changed files with 44 additions and 37 deletions

View File

@ -127,11 +127,11 @@ public class HelloController {
@FXML
private String veggieImageUrl = "pics/vegetarisch.png";
private String veggieImageUrl = "vegetarisch.png";
@FXML
private String veganUrl = "pics/vegan.png";
private String veganUrl = "vegan.png";
@FXML
private String meatUrl = "pics/fleisch.png";
private String meatUrl = "fleisch.png";
@FXML
private String imageUrl;
@ -172,7 +172,7 @@ public class HelloController {
imageUrl=veganUrl;
}
Image image = new Image("C:/VPR_Projekt_Java/target/classes/com/example/vpr_javafx/" + imageUrl);
Image image = new Image("file:target/classes/com/example/vpr_javafx/pics/" + imageUrl);
switch (i) {
case 0:
@ -277,6 +277,16 @@ public class HelloController {
+ "8: Konservierungsstoff");
}
@FXML
protected void ToRegistration(ActionEvent event) throws IOException
{
Parent root = FXMLLoader.load(getClass().getResource("Registration-view.fxml"));
Stage stage = (Stage) ((Node) event.getSource()).getScene().getWindow();
Scene scene = new Scene(root);
stage.setScene(scene);
stage.show();
}
@FXML
protected void OnRegistrationButton(ActionEvent event) throws IOException
{

View File

@ -70,7 +70,7 @@
</font></Label>
<PasswordField fx:id="pfPassword" style="-fx-background-color: #f0c8cb;" />
<Button mnemonicParsing="false" onAction="#OnSignInButton" style="-fx-background-color: #c7d0f0;" text="anmelden" textFill="WHITE" />
<Button style="-fx-background-color: #c7d0f0;" textFill="WHITE" mnemonicParsing="false" text="registrieren" />
<Button onAction="#ToRegistration" style="-fx-background-color: #c7d0f0;" textFill="WHITE" mnemonicParsing="false" text="registrieren" />
</items>
</ToolBar>
<Line endX="100.0" layoutX="245.0" layoutY="310.0" startX="-100.0" stroke="#746fa6" strokeWidth="3.0" />

View File

@ -70,7 +70,7 @@
</font></Label>
<PasswordField fx:id="pfPassword" style="-fx-background-color: #f0c8cb;" />
<Button mnemonicParsing="false" onAction="#OnSignInButton" style="-fx-background-color: #c7d0f0;" text="anmelden" textFill="WHITE" />
<Button style="-fx-background-color: #c7d0f0;" textFill="WHITE" mnemonicParsing="false" text="registrieren" />
<Button onAction="#ToRegistration" style="-fx-background-color: #c7d0f0;" textFill="WHITE" mnemonicParsing="false" text="registrieren" />
</items>
</ToolBar>
<Line endX="100.0" layoutX="245.0" layoutY="310.0" startX="-100.0" stroke="#746fa6" strokeWidth="3.0" />

View File

@ -4,34 +4,31 @@
<?import javafx.scene.layout.*?>
<AnchorPane prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/11.0.14-internal" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.example.vpr_javafx.HelloController">
<children>
<GridPane layoutX="100.0" layoutY="75.0" prefHeight="250.0" prefWidth="400.0">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" maxWidth="153.0" minWidth="10.0" prefWidth="89.8" />
<ColumnConstraints hgrow="SOMETIMES" maxWidth="261.0" minWidth="10.0" prefWidth="226.2" />
</columnConstraints>
<rowConstraints>
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<Label text="Voller Name: " />
<Label text="Handynummer: " GridPane.rowIndex="1" />
<Label prefWidth="95.0" text="Passwort: " GridPane.rowIndex="2" />
<Label text="Kind: " GridPane.rowIndex="4" />
<Button mnemonicParsing="false" prefHeight="26.0" prefWidth="90.0" text="Abschicken" translateX="100.0" GridPane.columnIndex="1" GridPane.rowIndex="6" />
<Label text="Passwort bestätigen: " GridPane.rowIndex="3" />
<PasswordField GridPane.columnIndex="1" GridPane.rowIndex="2" />
<PasswordField GridPane.columnIndex="1" GridPane.rowIndex="3" />
<TextField GridPane.columnIndex="1" />
<TextField GridPane.columnIndex="1" GridPane.rowIndex="1" />
<TextField GridPane.columnIndex="1" GridPane.rowIndex="4" />
</children>
</GridPane>
</children>
</AnchorPane>
<children>
<GridPane layoutX="100.0" layoutY="75.0" prefHeight="250.0" prefWidth="400.0">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" maxWidth="153.0" minWidth="10.0" prefWidth="89.8" />
<ColumnConstraints hgrow="SOMETIMES" maxWidth="261.0" minWidth="10.0" prefWidth="226.2" />
</columnConstraints>
<rowConstraints>
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<Label text="Voller Name: " />
<Label text="Handynummer: " GridPane.rowIndex="1" />
<Label prefWidth="95.0" text="Passwort: " GridPane.rowIndex="2" />
<Label text="Kind: " GridPane.rowIndex="3" />
<Button mnemonicParsing="false" onAction="#OnRegistrationButton" prefHeight="26.0" prefWidth="90.0" text="Abschicken" translateX="100.0" GridPane.columnIndex="1" GridPane.rowIndex="5" />
<PasswordField fx:id="pfPassword" GridPane.columnIndex="1" GridPane.rowIndex="2" />
<TextField fx:id="tfName" GridPane.columnIndex="1" />
<TextField fx:id="tfPhone" GridPane.columnIndex="1" GridPane.rowIndex="1" />
<TextField fx:id="tfChild" GridPane.columnIndex="1" GridPane.rowIndex="3" />
</children>
</GridPane>
</children>
</AnchorPane>