From c73ab8d8a546d9babef9278532329050f4183773 Mon Sep 17 00:00:00 2001
From: Jan <janschubert93@web.de>
Date: Fri, 29 Nov 2019 10:28:35 +0100
Subject: [PATCH] =?UTF-8?q?l=C3=B6schen=20Funktion=20verbessert?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 src/main/java/enigma/App.java             |   1 +
 src/main/java/enigma/GuiController.java   | 142 ++++++----------------
 src/main/resources/enigma/gui.fxml        |  67 +++++-----
 src/main/resources/enigma/kenngruppe.fxml |  13 +-
 4 files changed, 82 insertions(+), 141 deletions(-)

diff --git a/src/main/java/enigma/App.java b/src/main/java/enigma/App.java
index 7dd22d6..5d078d0 100644
--- a/src/main/java/enigma/App.java
+++ b/src/main/java/enigma/App.java
@@ -62,6 +62,7 @@ public class App extends Application {
 	public void start(Stage stage) throws IOException {
 		scene = new Scene(loadFXML("gui"));
 		stage.setScene(scene);
+		stage.setResizable(true);
 		stage.show();
 	}
 
diff --git a/src/main/java/enigma/GuiController.java b/src/main/java/enigma/GuiController.java
index 377cab1..c3567bc 100644
--- a/src/main/java/enigma/GuiController.java
+++ b/src/main/java/enigma/GuiController.java
@@ -12,9 +12,9 @@ import java.util.ArrayList;
 
 public class GuiController {
 
-	private final static String[] str = {"I", "II", "III", "IV", "V"};
-	private final static String[] num = {"1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26"};
-	private final static String[] bs = {"A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"};
+	private final static String[] walzenNr = {"I", "II", "III", "IV", "V"};
+	private final static String[] ringNr = {"1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26"};
+	private final static String[] position = {"A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"};
 	private ArrayList<MenuItem> mItem;
 	private String textEingabe;
 	private String textCodiert;
@@ -124,10 +124,10 @@ public class GuiController {
 	private MenuButton mBtnStartPos2;
 
 	@FXML
-	private TextField tfrein;
+	private TextField tfKlartext;
 
 	@FXML
-	private TextField tfcodiert;
+	private TextField tfCodiert;
 
 	@FXML
 	private MenuButton mBtnNotchPos1;
@@ -327,94 +327,22 @@ public class GuiController {
         resetDisplay = true;
 
 		//Einträge für Walzen
-		menu(mBtnWalzPos1, str);
-		menu(mBtnWalzPos2, str);
-		menu(mBtnWalzPos3, str);
+		menu(mBtnWalzPos1, walzenNr);
+		menu(mBtnWalzPos2, walzenNr);
+		menu(mBtnWalzPos3, walzenNr);
 
 		//Einträge für die Ringe
-		menu(mBtnNotchPos1, num);
-		menu(mBtnNotchPos2, num);
-		menu(mBtnNotchPos3, num);
+		menu(mBtnNotchPos1, ringNr);
+		menu(mBtnNotchPos2, ringNr);
+		menu(mBtnNotchPos3, ringNr);
 
 		//Einträge für die Startpositionen
-		menu(mBtnStartPos1, bs);
-		menu(mBtnStartPos3, bs);
-		menu(mBtnStartPos2, bs);
-
-		assert tfStecker1 != null : "fx:id=\"tfStecker1\" was not injected: check your FXML file 'gui.fxml'.";
-		assert tfStecker2 != null : "fx:id=\"tfStecker2\" was not injected: check your FXML file 'gui.fxml'.";
-		assert tfStecker3 != null : "fx:id=\"tfStecker3\" was not injected: check your FXML file 'gui.fxml'.";
-		assert tfStecker4 != null : "fx:id=\"tfStecker4\" was not injected: check your FXML file 'gui.fxml'.";
-		assert tfStecker5 != null : "fx:id=\"tfStecker5\" was not injected: check your FXML file 'gui.fxml'.";
-		assert tfStecker6 != null : "fx:id=\"tfStecker6\" was not injected: check your FXML file 'gui.fxml'.";
-		assert tfStecker7 != null : "fx:id=\"tfStecker7\" was not injected: check your FXML file 'gui.fxml'.";
-		assert tfStecker8 != null : "fx:id=\"tfStecker8\" was not injected: check your FXML file 'gui.fxml'.";
-		assert tfStecker9 != null : "fx:id=\"tfStecker9\" was not injected: check your FXML file 'gui.fxml'.";
-		assert tfStecker10 != null : "fx:id=\"tfStecker10\" was not injected: check your FXML file 'gui.fxml'.";
-		assert btnP != null : "fx:id=\"btnP\" was not injected: check your FXML file 'gui.fxml'.";
-		assert btnY != null : "fx:id=\"btnY\" was not injected: check your FXML file 'gui.fxml'.";
-		assert btnX != null : "fx:id=\"btnX\" was not injected: check your FXML file 'gui.fxml'.";
-		assert btnC != null : "fx:id=\"btnC\" was not injected: check your FXML file 'gui.fxml'.";
-		assert btnV != null : "fx:id=\"btnV\" was not injected: check your FXML file 'gui.fxml'.";
-		assert btnB != null : "fx:id=\"btnB\" was not injected: check your FXML file 'gui.fxml'.";
-		assert btnN != null : "fx:id=\"btnN\" was not injected: check your FXML file 'gui.fxml'.";
-		assert btnM != null : "fx:id=\"btnM\" was not injected: check your FXML file 'gui.fxml'.";
-		assert btnL != null : "fx:id=\"btnL\" was not injected: check your FXML file 'gui.fxml'.";
-		assert btnA != null : "fx:id=\"btnA\" was not injected: check your FXML file 'gui.fxml'.";
-		assert btnS != null : "fx:id=\"btnS\" was not injected: check your FXML file 'gui.fxml'.";
-		assert btnD != null : "fx:id=\"btnD\" was not injected: check your FXML file 'gui.fxml'.";
-		assert btnF != null : "fx:id=\"btnF\" was not injected: check your FXML file 'gui.fxml'.";
-		assert btnG != null : "fx:id=\"btnG\" was not injected: check your FXML file 'gui.fxml'.";
-		assert btnH != null : "fx:id=\"btnH\" was not injected: check your FXML file 'gui.fxml'.";
-		assert btnJ != null : "fx:id=\"btnJ\" was not injected: check your FXML file 'gui.fxml'.";
-		assert btnK != null : "fx:id=\"btnK\" was not injected: check your FXML file 'gui.fxml'.";
-		assert btnQ != null : "fx:id=\"btnQ\" was not injected: check your FXML file 'gui.fxml'.";
-		assert btnW != null : "fx:id=\"btnW\" was not injected: check your FXML file 'gui.fxml'.";
-		assert btnE != null : "fx:id=\"btnE\" was not injected: check your FXML file 'gui.fxml'.";
-		assert btnR != null : "fx:id=\"btnR\" was not injected: check your FXML file 'gui.fxml'.";
-		assert btnT != null : "fx:id=\"btnT\" was not injected: check your FXML file 'gui.fxml'.";
-		assert btnZ != null : "fx:id=\"btnZ\" was not injected: check your FXML file 'gui.fxml'.";
-		assert btnU != null : "fx:id=\"btnU\" was not injected: check your FXML file 'gui.fxml'.";
-		assert btnI != null : "fx:id=\"btnI\" was not injected: check your FXML file 'gui.fxml'.";
-		assert btnO != null : "fx:id=\"btnO\" was not injected: check your FXML file 'gui.fxml'.";
-		assert mBtnWalzPos1 != null : "fx:id=\"mBtnWalzPos1\" was not injected: check your FXML file 'gui.fxml'.";
-		assert mBtnWalzPos3 != null : "fx:id=\"mBtnWalzPos3\" was not injected: check your FXML file 'gui.fxml'.";
-		assert mBtnWalzPos2 != null : "fx:id=\"mBtnWalzPos2\" was not injected: check your FXML file 'gui.fxml'.";
-		assert mBtnNotchPos3 != null : "fx:id=\"mBtnNotchPos3\" was not injected: check your FXML file 'gui.fxml'.";
-		assert mBtnNotchPos2 != null : "fx:id=\"mBtnNotchPos2\" was not injected: check your FXML file 'gui.fxml'.";
-		assert mBtnStartPos1 != null : "fx:id=\"mBtnStartPos1\" was not injected: check your FXML file 'gui.fxml'.";
-		assert mBtnStartPos3 != null : "fx:id=\"mBtnStartPos3\" was not injected: check your FXML file 'gui.fxml'.";
-		assert mBtnStartPos2 != null : "fx:id=\"mBtnStartPos2\" was not injected: check your FXML file 'gui.fxml'.";
-		assert tfrein != null : "fx:id=\"tfrein\" was not injected: check your FXML file 'gui.fxml'.";
-		assert tfcodiert != null : "fx:id=\"tfcodiert\" was not injected: check your FXML file 'gui.fxml'.";
-		assert mBtnNotchPos1 != null : "fx:id=\"mBtnNotchPos1\" was not injected: check your FXML file 'gui.fxml'.";
-		assert lblQ != null : "fx:id=\"lblQ\" was not injected: check your FXML file 'gui.fxml'.";
-		assert lblE != null : "fx:id=\"lblE\" was not injected: check your FXML file 'gui.fxml'.";
-		assert lblW != null : "fx:id=\"lblW\" was not injected: check your FXML file 'gui.fxml'.";
-		assert lblR != null : "fx:id=\"lblR\" was not injected: check your FXML file 'gui.fxml'.";
-		assert lblT != null : "fx:id=\"lblT\" was not injected: check your FXML file 'gui.fxml'.";
-		assert lblZ != null : "fx:id=\"lblZ\" was not injected: check your FXML file 'gui.fxml'.";
-		assert lblO != null : "fx:id=\"lblO\" was not injected: check your FXML file 'gui.fxml'.";
-		assert lblI != null : "fx:id=\"lblI\" was not injected: check your FXML file 'gui.fxml'.";
-		assert lblU != null : "fx:id=\"lblU\" was not injected: check your FXML file 'gui.fxml'.";
-		assert lblA != null : "fx:id=\"lblA\" was not injected: check your FXML file 'gui.fxml'.";
-		assert lblD != null : "fx:id=\"lblD\" was not injected: check your FXML file 'gui.fxml'.";
-		assert lblS != null : "fx:id=\"lblS\" was not injected: check your FXML file 'gui.fxml'.";
-		assert lblF != null : "fx:id=\"lblF\" was not injected: check your FXML file 'gui.fxml'.";
-		assert lblG != null : "fx:id=\"lblG\" was not injected: check your FXML file 'gui.fxml'.";
-		assert lblH != null : "fx:id=\"lblH\" was not injected: check your FXML file 'gui.fxml'.";
-		assert lblK != null : "fx:id=\"lblK\" was not injected: check your FXML file 'gui.fxml'.";
-		assert lblJ != null : "fx:id=\"lblJ\" was not injected: check your FXML file 'gui.fxml'.";
-		assert lblP != null : "fx:id=\"lblP\" was not injected: check your FXML file 'gui.fxml'.";
-		assert lblX != null : "fx:id=\"lblX\" was not injected: check your FXML file 'gui.fxml'.";
-		assert lblY != null : "fx:id=\"lblY\" was not injected: check your FXML file 'gui.fxml'.";
-		assert lblC != null : "fx:id=\"lblC\" was not injected: check your FXML file 'gui.fxml'.";
-		assert lblV != null : "fx:id=\"lblV\" was not injected: check your FXML file 'gui.fxml'.";
-		assert lblB != null : "fx:id=\"lblB\" was not injected: check your FXML file 'gui.fxml'.";
-		assert lblL != null : "fx:id=\"lblL\" was not injected: check your FXML file 'gui.fxml'.";
-		assert lblM != null : "fx:id=\"lblM\" was not injected: check your FXML file 'gui.fxml'.";
-		assert lblN != null : "fx:id=\"lblN\" was not injected: check your FXML file 'gui.fxml'.";
+		menu(mBtnStartPos1, position);
+		menu(mBtnStartPos3, position);
+		menu(mBtnStartPos2, position);
 
+
+		//Setze Leucht Event bei Tastendruck
 		leuchten(btnA, circA);
 		leuchten(btnB, circB);
 		leuchten(btnC, circC);
@@ -441,7 +369,6 @@ public class GuiController {
 		leuchten(btnX, circX);
 		leuchten(btnY, circY);
 		leuchten(btnZ, circZ);
-		//TODO: Leuchten und Tasten ordnen
 
 		this.codierer = new Codierer();
         this.codierer.setKenngruppe("enigma");
@@ -454,17 +381,20 @@ public class GuiController {
 
 	@FXML
 	void löschen() {
-		textEingabe = textEingabe.substring(0, textEingabe.length() - 1);
-		tfrein.setText(textEingabe);
-		//TODO: anpassen, wenn kein Text da ist
+		if (textEingabe.length()==0){
+			tfKlartext.setText("");
+		}else {
+			textEingabe = textEingabe.substring(0, textEingabe.length() - 1);
+			tfKlartext.setText(textEingabe);
+		}
 	}
 
 	@FXML
 	void btnempfangen() {
 	    String[] empfangeneNachricht = this.codierer.empfangeNachricht();
 		if (empfangeneNachricht[0] != null) {
-            this.tfrein.setText(empfangeneNachricht[2]);
-            this.tfcodiert.setText(empfangeneNachricht[1]);
+            this.tfKlartext.setText(empfangeneNachricht[2]);
+            this.tfCodiert.setText(empfangeneNachricht[1]);
             this.resetDisplay = true;
 
             mBtnStartPos1.setText(String.valueOf(this.codierer.getWalzen()[0]));
@@ -475,8 +405,8 @@ public class GuiController {
 
 	@FXML
 	void btnsenden() {
-		this.tfrein.setText("");
-		this.tfcodiert.setText("");
+		this.tfKlartext.setText("");
+		this.tfCodiert.setText("");
 
 		try {
 			this.codierer.sendeNachricht();
@@ -562,8 +492,8 @@ public class GuiController {
 	private void setText(Button b) {
 		if (textEingabe.length() < 250) {
 		    if(this.resetDisplay) {
-		        this.tfcodiert.setText("");
-		        this.tfrein.setText("");
+		        this.tfCodiert.setText("");
+		        this.tfKlartext.setText("");
 		        this.resetDisplay = false;
 		        this.codierer.resetHardware();
 		        textCodiert = "";
@@ -574,8 +504,8 @@ public class GuiController {
 		    textEingabe += b.getText();
             textCodiert += this.codierer.codiere(b.getText().charAt(0), true);
 
-			tfrein.setText(textEingabe);
-			tfcodiert.setText(textCodiert);
+			tfKlartext.setText(textEingabe);
+			tfCodiert.setText(textCodiert);
 
 			mBtnStartPos1.setText(String.valueOf(this.codierer.getWalzen()[0]));
             mBtnStartPos2.setText(String.valueOf(this.codierer.getWalzen()[1]));
@@ -605,13 +535,13 @@ public class GuiController {
 	public void setzeWalze(int walze, int position) {
 		switch (position) {
 			case 1:
-				mBtnWalzPos1.setText(str[position]);
+				mBtnWalzPos1.setText(walzenNr[position]);
 				break;
 			case 2:
-				mBtnWalzPos2.setText(str[position]);
+				mBtnWalzPos2.setText(walzenNr[position]);
 				break;
 			case 3:
-				mBtnWalzPos3.setText(str[position]);
+				mBtnWalzPos3.setText(walzenNr[position]);
 				break;
 			default:
 				break;
@@ -629,13 +559,13 @@ public class GuiController {
 	public void setzeRing(int walze, int position) {
 		switch (walze) {
 			case 1:
-				mBtnNotchPos1.setText(num[position]);
+				mBtnNotchPos1.setText(ringNr[position]);
 				break;
 			case 2:
-				mBtnNotchPos2.setText(num[position]);
+				mBtnNotchPos2.setText(ringNr[position]);
 				break;
 			case 3:
-				mBtnNotchPos3.setText(num[position]);
+				mBtnNotchPos3.setText(ringNr[position]);
 				break;
 			default:
 				break;
diff --git a/src/main/resources/enigma/gui.fxml b/src/main/resources/enigma/gui.fxml
index fd53164..32d90e5 100644
--- a/src/main/resources/enigma/gui.fxml
+++ b/src/main/resources/enigma/gui.fxml
@@ -36,21 +36,25 @@
       <Circle fx:id="circM" fill="#f0f3f5" layoutX="703.0" layoutY="416.0" radius="22.0" stroke="BLACK" strokeType="INSIDE" />
       <Circle fx:id="circL" fill="#f0f3f5" layoutX="798.0" layoutY="416.0" radius="22.0" stroke="BLACK" strokeType="INSIDE" />
       <Circle fx:id="circW" fill="#f0f3f5" layoutX="221.0" layoutY="309.0" radius="22.0" stroke="BLACK" strokeType="INSIDE" />
-      <TextField fx:id="tfStecker1" layoutX="104.0" layoutY="631.0" prefHeight="25.0" prefWidth="48.0" AnchorPane.bottomAnchor="20.0" AnchorPane.leftAnchor="104.0" />
-      <TextField fx:id="tfStecker2" layoutX="184.0" layoutY="631.0" prefHeight="25.0" prefWidth="48.0" AnchorPane.bottomAnchor="20.0" AnchorPane.leftAnchor="184.0" />
-      <TextField fx:id="tfStecker3" layoutX="263.0" layoutY="631.0" prefHeight="25.0" prefWidth="48.0" AnchorPane.bottomAnchor="20.0" AnchorPane.leftAnchor="263.0" />
-      <TextField fx:id="tfStecker4" layoutX="343.0" layoutY="631.0" prefHeight="25.0" prefWidth="48.0" AnchorPane.bottomAnchor="20.0" AnchorPane.leftAnchor="343.0" />
-      <TextField fx:id="tfStecker5" layoutX="416.0" layoutY="631.0" prefHeight="25.0" prefWidth="48.0" AnchorPane.bottomAnchor="20.0" AnchorPane.leftAnchor="416.0" />
-      <TextField fx:id="tfStecker6" layoutX="496.0" layoutY="631.0" prefHeight="25.0" prefWidth="48.0" AnchorPane.bottomAnchor="20.0" AnchorPane.leftAnchor="496.0" />
-      <TextField fx:id="tfStecker7" layoutX="576.0" layoutY="631.0" prefHeight="25.0" prefWidth="48.0" AnchorPane.bottomAnchor="20.0" AnchorPane.leftAnchor="576.0" />
-      <TextField fx:id="tfStecker8" layoutX="656.0" layoutY="631.0" prefHeight="25.0" prefWidth="48.0" AnchorPane.bottomAnchor="20.0" AnchorPane.leftAnchor="656.0" />
-      <TextField fx:id="tfStecker9" layoutX="736.0" layoutY="631.0" prefHeight="25.0" prefWidth="48.0" AnchorPane.bottomAnchor="20.0" AnchorPane.leftAnchor="736.0" />
-      <TextField fx:id="tfStecker10" layoutX="816.0" layoutY="631.0" prefHeight="25.0" prefWidth="48.0" AnchorPane.bottomAnchor="20.0" AnchorPane.leftAnchor="816.0" AnchorPane.rightAnchor="103.0" />
-      <MenuButton fx:id="mBtnWalzPos1" alignment="CENTER_RIGHT" contentDisplay="CENTER" layoutX="91.0" layoutY="76.0" mnemonicParsing="false" prefHeight="25.0" prefWidth="48.0" text="I" AnchorPane.leftAnchor="90.0" AnchorPane.topAnchor="80.0">
+      <AnchorPane layoutX="109.0" layoutY="631.0" prefHeight="25.0" prefWidth="787.0">
+         <children>
+            <TextField fx:id="tfStecker1" prefHeight="25.0" prefWidth="48.0" />
+            <TextField fx:id="tfStecker2" layoutX="80.0" prefHeight="25.0" prefWidth="48.0" />
+            <TextField fx:id="tfStecker3" layoutX="159.0" prefHeight="25.0" prefWidth="48.0" />
+            <TextField fx:id="tfStecker4" layoutX="239.0" prefHeight="25.0" prefWidth="48.0" />
+            <TextField fx:id="tfStecker5" layoutX="312.0" prefHeight="25.0" prefWidth="48.0" />
+            <TextField fx:id="tfStecker6" layoutX="392.0" prefHeight="25.0" prefWidth="48.0" />
+            <TextField fx:id="tfStecker7" layoutX="472.0" prefHeight="25.0" prefWidth="48.0" />
+            <TextField fx:id="tfStecker8" layoutX="552.0" prefHeight="25.0" prefWidth="48.0" />
+            <TextField fx:id="tfStecker9" layoutX="632.0" prefHeight="25.0" prefWidth="48.0" />
+            <TextField fx:id="tfStecker10" layoutX="712.0" prefHeight="25.0" prefWidth="48.0" />
+         </children>
+      </AnchorPane>
+      <MenuButton fx:id="mBtnWalzPos1" alignment="CENTER_RIGHT" contentDisplay="CENTER" layoutX="91.0" layoutY="76.0" mnemonicParsing="false" prefHeight="25.0" prefWidth="48.0" text="I">
       </MenuButton>
-      <MenuButton fx:id="mBtnWalzPos3" alignment="CENTER_RIGHT" layoutX="208.0" layoutY="80.0" mnemonicParsing="false" prefHeight="25.0" prefWidth="48.0" text="I" textAlignment="CENTER" AnchorPane.leftAnchor="210.0" AnchorPane.topAnchor="80.0">
+      <MenuButton fx:id="mBtnWalzPos3" alignment="CENTER_RIGHT" layoutX="208.0" layoutY="80.0" mnemonicParsing="false" prefHeight="25.0" prefWidth="48.0" text="I" textAlignment="CENTER">
       </MenuButton>
-      <MenuButton fx:id="mBtnWalzPos2" alignment="CENTER_RIGHT" layoutX="152.0" layoutY="80.0" mnemonicParsing="false" prefHeight="25.0" prefWidth="48.0" text="I" textAlignment="CENTER" AnchorPane.leftAnchor="150.0" AnchorPane.topAnchor="80.0">
+      <MenuButton fx:id="mBtnWalzPos2" alignment="CENTER_RIGHT" layoutX="152.0" layoutY="80.0" mnemonicParsing="false" prefHeight="25.0" prefWidth="48.0" text="I" textAlignment="CENTER">
       </MenuButton>
 <!--      <MenuButton layoutX="93.0" layoutY="114.0" mnemonicParsing="false">-->
 <!--         <items>-->
@@ -82,25 +86,25 @@
 <!--            <MenuItem mnemonicParsing="false" onAction="#z26" text="26" />-->
 <!--         </items>-->
 <!--      </MenuButton>-->
-      <MenuButton fx:id="mBtnNotchPos3" alignment="CENTER_RIGHT" layoutX="208.0" layoutY="120.0" mnemonicParsing="false" prefHeight="25.0" prefWidth="48.0" text="1" textAlignment="CENTER" AnchorPane.leftAnchor="210.0" AnchorPane.topAnchor="120.0">
+      <MenuButton fx:id="mBtnNotchPos3" alignment="CENTER_RIGHT" layoutX="208.0" layoutY="120.0" mnemonicParsing="false" prefHeight="25.0" prefWidth="48.0" text="1" textAlignment="CENTER">
       </MenuButton>
-      <MenuButton fx:id="mBtnNotchPos2" alignment="CENTER_RIGHT" layoutX="152.0" layoutY="120.0" mnemonicParsing="false" prefHeight="25.0" prefWidth="48.0" text="1" textAlignment="CENTER" AnchorPane.leftAnchor="150.0" AnchorPane.topAnchor="120.0">
+      <MenuButton fx:id="mBtnNotchPos2" alignment="CENTER_RIGHT" layoutX="152.0" layoutY="120.0" mnemonicParsing="false" prefHeight="25.0" prefWidth="48.0" text="1" textAlignment="CENTER">
       </MenuButton>
-      <MenuButton fx:id="mBtnStartPos1" alignment="CENTER_RIGHT" layoutX="95.0" layoutY="157.0" mnemonicParsing="false" prefHeight="25.0" prefWidth="48.0" text="A" textAlignment="CENTER" AnchorPane.leftAnchor="90.0" AnchorPane.topAnchor="160.0">
+      <MenuButton fx:id="mBtnStartPos1" alignment="CENTER_RIGHT" layoutX="95.0" layoutY="157.0" mnemonicParsing="false" prefHeight="25.0" prefWidth="48.0" text="A" textAlignment="CENTER">
       </MenuButton>
-      <MenuButton fx:id="mBtnStartPos3" alignment="CENTER_RIGHT" layoutX="208.0" layoutY="160.0" mnemonicParsing="false" prefHeight="25.0" prefWidth="48.0" text="A" textAlignment="CENTER" AnchorPane.leftAnchor="210.0" AnchorPane.topAnchor="160.0">
+      <MenuButton fx:id="mBtnStartPos3" alignment="CENTER_RIGHT" layoutX="208.0" layoutY="160.0" mnemonicParsing="false" prefHeight="25.0" prefWidth="48.0" text="A" textAlignment="CENTER">
       </MenuButton>
-      <MenuButton fx:id="mBtnStartPos2" alignment="CENTER_RIGHT" layoutX="152.0" layoutY="160.0" mnemonicParsing="false" prefHeight="25.0" prefWidth="48.0" text="A" textAlignment="CENTER" AnchorPane.leftAnchor="150.0" AnchorPane.topAnchor="160.0">
+      <MenuButton fx:id="mBtnStartPos2" alignment="CENTER_RIGHT" layoutX="152.0" layoutY="160.0" mnemonicParsing="false" prefHeight="25.0" prefWidth="48.0" text="A" textAlignment="CENTER">
       </MenuButton>
-      <TextField fx:id="tfrein" editable="false" layoutX="280.0" layoutY="54.0" prefHeight="77.0" prefWidth="410.0" />
-      <TextField fx:id="tfcodiert" editable="false" layoutX="280.0" layoutY="149.0" prefHeight="77.0" prefWidth="410.0" />
-      <Button layoutX="726.0" layoutY="153.0" mnemonicParsing="false" onAction="#btnsenden" prefHeight="69.0" prefWidth="164.0" text="An Funker senden" AnchorPane.rightAnchor="77.0" />
-      <Button layoutX="726.0" layoutY="58.0" mnemonicParsing="false" onAction="#btnempfangen" prefHeight="69.0" prefWidth="164.0" text="Funkspruch empfangen" AnchorPane.rightAnchor="77.0" />
-      <MenuButton fx:id="mBtnNotchPos1" alignment="CENTER_RIGHT" layoutX="93.0" layoutY="114.0" mnemonicParsing="false" prefHeight="25.0" prefWidth="48.0" text="1" textAlignment="CENTER" AnchorPane.leftAnchor="90.0" AnchorPane.topAnchor="120.0" />
-      <Label layoutX="29.0" layoutY="80.0" text="Walze" AnchorPane.leftAnchor="20.0" AnchorPane.topAnchor="84.0" />
-      <Label layoutX="29.0" layoutY="127.0" text="Ringe" AnchorPane.leftAnchor="20.0" AnchorPane.topAnchor="124.0" />
-      <Label layoutX="17.0" layoutY="164.0" text="Startposition" AnchorPane.leftAnchor="17.0" AnchorPane.topAnchor="164.0" />
-      <Label layoutX="380.0" layoutY="27.0" prefHeight="17.0" prefWidth="172.0" text="Tageseinstellungen" />
+      <TextField fx:id="tfKlartext" editable="false" layoutX="280.0" layoutY="54.0" prefHeight="77.0" prefWidth="410.0" AnchorPane.bottomAnchor="546.0" AnchorPane.leftAnchor="280.0" AnchorPane.rightAnchor="277.0" AnchorPane.topAnchor="54.0" />
+      <TextField fx:id="tfCodiert" editable="false" layoutX="280.0" layoutY="149.0" prefHeight="77.0" prefWidth="410.0" AnchorPane.bottomAnchor="451.0" AnchorPane.leftAnchor="280.0" AnchorPane.rightAnchor="277.0" AnchorPane.topAnchor="149.0" />
+      <Button layoutX="730.0" layoutY="58.0" mnemonicParsing="false" onAction="#btnsenden" prefHeight="69.0" prefWidth="164.0" text="An Funker senden" AnchorPane.topAnchor="58.0" />
+      <Button layoutX="730.0" layoutY="153.0" mnemonicParsing="false" onAction="#btnempfangen" prefHeight="69.0" prefWidth="164.0" text="Funkspruch empfangen" />
+      <MenuButton fx:id="mBtnNotchPos1" alignment="CENTER_RIGHT" layoutX="93.0" layoutY="114.0" mnemonicParsing="false" prefHeight="25.0" prefWidth="48.0" text="1" textAlignment="CENTER" />
+      <Label layoutX="29.0" layoutY="80.0" text="Walze" />
+      <Label layoutX="29.0" layoutY="127.0" text="Ringe" />
+      <Label layoutX="17.0" layoutY="164.0" text="Startposition" />
+      <Label layoutX="68.0" layoutY="226.0" prefHeight="17.0" prefWidth="172.0" text="Spruchschlüssel" />
       <Label fx:id="lblE" alignment="CENTER" layoutX="300.0" layoutY="292.0" prefHeight="30.0" prefWidth="30.0" text="E" textAlignment="CENTER" AnchorPane.bottomAnchor="351.0">
          <font>
             <Font size="23.0" />
@@ -126,7 +130,7 @@
             <Font size="23.0" />
          </font>
       </Label>
-      <Label fx:id="lblO" alignment="CENTER" layoutX="801.0" layoutY="292.0" prefHeight="30.0" prefWidth="30.0" text="O" textAlignment="CENTER" AnchorPane.bottomAnchor="351.0" AnchorPane.rightAnchor="136.0">
+      <Label fx:id="lblO" alignment="CENTER" layoutX="801.0" layoutY="292.0" prefHeight="30.0" prefWidth="30.0" text="O" textAlignment="CENTER" AnchorPane.bottomAnchor="351.0">
          <font>
             <Font size="23.0" />
          </font>
@@ -171,7 +175,7 @@
             <Font size="23.0" />
          </font>
       </Label>
-      <Label fx:id="lblK" alignment="CENTER" layoutX="748.0" layoutY="346.0" minHeight="0.0" prefHeight="30.0" prefWidth="30.0" text="K" AnchorPane.bottomAnchor="301.0" AnchorPane.rightAnchor="189.0">
+      <Label fx:id="lblK" alignment="CENTER" layoutX="748.0" layoutY="346.0" minHeight="0.0" prefHeight="30.0" prefWidth="30.0" text="K" AnchorPane.bottomAnchor="301.0">
          <font>
             <Font size="23.0" />
          </font>
@@ -181,7 +185,7 @@
             <Font size="23.0" />
          </font>
       </Label>
-      <Label fx:id="lblP" alignment="CENTER" layoutX="97.0" layoutY="401.0" minHeight="0.0" prefHeight="30.0" prefWidth="30.0" text="P" AnchorPane.bottomAnchor="246.0" AnchorPane.leftAnchor="97.0">
+      <Label fx:id="lblP" alignment="CENTER" layoutX="97.0" layoutY="401.0" minHeight="0.0" prefHeight="30.0" prefWidth="30.0" text="P" AnchorPane.bottomAnchor="246.0">
          <font>
             <Font size="23.0" />
          </font>
@@ -211,7 +215,7 @@
             <Font size="23.0" />
          </font>
       </Label>
-      <Label fx:id="lblL" alignment="CENTER" layoutX="782.0" layoutY="401.0" minHeight="0.0" prefHeight="30.0" prefWidth="30.0" text="L" AnchorPane.bottomAnchor="246.0" AnchorPane.rightAnchor="155.0">
+      <Label fx:id="lblL" alignment="CENTER" layoutX="782.0" layoutY="401.0" minHeight="0.0" prefHeight="30.0" prefWidth="30.0" text="L" AnchorPane.bottomAnchor="246.0">
          <font>
             <Font size="23.0" />
          </font>
@@ -365,5 +369,6 @@
             <Font name="System Bold" size="18.0" />
          </font>
       </Button>
+      <Label layoutX="68.0" layoutY="205.0" prefHeight="17.0" prefWidth="172.0" text="Tagesschlüssel" />
    </children>
 </AnchorPane>
diff --git a/src/main/resources/enigma/kenngruppe.fxml b/src/main/resources/enigma/kenngruppe.fxml
index 1f56aca..2494b05 100644
--- a/src/main/resources/enigma/kenngruppe.fxml
+++ b/src/main/resources/enigma/kenngruppe.fxml
@@ -4,12 +4,17 @@
 <?import javafx.scene.control.Label?>
 <?import javafx.scene.control.TextField?>
 <?import javafx.scene.layout.AnchorPane?>
-
+<?import javafx.scene.layout.Pane?>
 
 <AnchorPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="257.0" prefWidth="300.0" xmlns="http://javafx.com/javafx/8.0.171" xmlns:fx="http://javafx.com/fxml/1" fx:controller="enigma.KenngruppeController">
    <children>
-      <Label layoutX="81.0" layoutY="29.0" text="Bitte Kenngruppe eingeben!" AnchorPane.leftAnchor="70.0" AnchorPane.rightAnchor="70.0" AnchorPane.topAnchor="30.0" />
-      <Button fx:id="secondaryButton" layoutX="72.0" layoutY="178.0" onAction="#switchToPrimary" text="Kenngruppe bestätigen!" AnchorPane.leftAnchor="70.0" AnchorPane.rightAnchor="70.0" AnchorPane.topAnchor="170.0" />
-      <TextField layoutX="81.0" layoutY="84.0" AnchorPane.leftAnchor="70.0" AnchorPane.rightAnchor="70.0" AnchorPane.topAnchor="100.0" />
+      <Label layoutX="81.0" layoutY="29.0" text="Bitte Kenngruppe eingeben!" />
+      <Button fx:id="secondaryButton" layoutX="72.0" layoutY="178.0" onAction="#switchToPrimary" text="Kenngruppe bestätigen!" />
+      <Pane layoutX="14.0" layoutY="100.0" prefHeight="25.0" prefWidth="234.0">
+         <children>
+            <TextField prefHeight="25.0" prefWidth="71.0" />
+            <TextField layoutX="126.0" prefHeight="25.0" prefWidth="108.0" />
+         </children>
+      </Pane>
    </children>
 </AnchorPane>
-- 
GitLab