From 7ae1fac1e7df97c594e95a95d1bbaf1e06802bde Mon Sep 17 00:00:00 2001 From: Adah Boukhari Date: Fri, 7 Feb 2020 12:04:52 +0100 Subject: [PATCH] Commit_41 KeyListener in LoginFrame_Class hinzugefuegt. Enter_Key bei Anmelden --- .../bin/MeinBudgetView/LoginFrame.class | Bin 3656 -> 4154 bytes .../src/MeinBudgetView/LoginFrame.java | 26 +++++++++++++++++- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/Budget Projekt/bin/MeinBudgetView/LoginFrame.class b/Budget Projekt/bin/MeinBudgetView/LoginFrame.class index 2ea4074ea3ce23619c263f9fd0138b9e6a379ce0..97b5f751252a782a9a52dd8e7ec25b7e5637c9c8 100644 GIT binary patch literal 4154 zcma)9dw3Mp760A5cC!p*b|pY~NCF7S5?B=#Ot4Be1QIq6AtVh->m(UA1G_Wp?kpj+ zRoiN-t*ve83$65Rt!=4*Y^bT!VjpTB);_c?ec6BdZ~yk|*RQ`jGrKz*^t0h(X70J? zo_o&k{LZ;|U;gj27XjRae+Ez`(A2LRW>Ml*a<_g+%ctyk%F5}389l2> zAh}^{udCalU=7v^)Kj<1%A1opfk107|Jp_ZxMqHe9PC0^hsJtt)T*E!p?XBo9>7L{ zMWvj?t(28junC(PtCgjT^jLKrmT7h7JEfs(67XJ3#{$cXkRNT8p@(I$yf)Mr0#r8AaE)_1n~fi4OI81$;972WM9a^E|pK4xd7fXpGXO9 zTu%jY7Zcy*tE-L>4x&dsT7qDFp`wc&%|RRzKmb#uzTczXH1X_Z!G~}dsQ`|UXmZ{y zjKT54`h=|@4YEGSHWW`WXh|;*B&U2FVP_B-freO0_NYw;EpE=3$q=%z1K^T|vQOfv~4uoRdYF#QPMyA0Kf2 zb;2WhMSo>II5Nl1z0%HomDS?TN=pavAq5}C{VZuFLt<2F8$}LCA^97?N0tleR4%1Ub?Jb;hMtv)VLECGLnvRlaQKB3@~c*NaK+K_&ixhN&vD~M0CvSQ=T zsi0*tF3NG7Q1DrNj+l_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ErVJ7bfQs?^0+`m_M-}2WVRF<1XH#orNNt!$I0vDF(+Oybl|(x5V%P zDeV+sEJ4^fhP=(ojt{?G- z*rEs6L&$i5Jp^q47ic8EUQ%j{nYbisZcWrYH*pE;=wV+@6|SdBHlhkmsKp9e16Ymb z#BsBeSq&bS^24|Ij&g3I%ltjAQr6dq(++E%?4uif9mfX`G>s%Z=WtSH{kXB%v*8r| qB^$1g1lCX`^+XVrkP_)`;kNL=Pyf&ID2YLi>;8j;(G-YqKmQHqS;{p4 diff --git a/Budget Projekt/src/MeinBudgetView/LoginFrame.java b/Budget Projekt/src/MeinBudgetView/LoginFrame.java index 57d0027..3c34955 100644 --- a/Budget Projekt/src/MeinBudgetView/LoginFrame.java +++ b/Budget Projekt/src/MeinBudgetView/LoginFrame.java @@ -6,6 +6,8 @@ import java.awt.Font; import java.awt.Image; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; +import java.awt.event.KeyEvent; +import java.awt.event.KeyListener; import javax.swing.JFrame; import javax.swing.JPanel; @@ -19,7 +21,7 @@ import javax.swing.JOptionPane; import java.awt.Color; -public class LoginFrame extends JFrame implements ActionListener { +public class LoginFrame extends JFrame implements ActionListener, KeyListener { public JPanel contentPane; public static JPasswordField passwordField; @@ -72,6 +74,7 @@ public class LoginFrame extends JFrame implements ActionListener { contentPane.add(loginHauptImage); this.anmelden.addActionListener(this); + this.anmelden.addKeyListener(this); passwordField.addActionListener(this); benutzername.addActionListener(this); } @@ -101,4 +104,25 @@ public class LoginFrame extends JFrame implements ActionListener { String result = String.valueOf(benutzername); return result; } + + @Override + public void keyTyped(KeyEvent e) { + + if (e.getSource() == this.anmelden) { + MeinGui run = new MeinGui(); + run.setVisible(true); + } + } + + @Override + public void keyPressed(KeyEvent e) { + // TODO Auto-generated method stub + + } + + @Override + public void keyReleased(KeyEvent e) { + // TODO Auto-generated method stub + + } }