From 7ae1fac1e7df97c594e95a95d1bbaf1e06802bde Mon Sep 17 00:00:00 2001 From: Adah Boukhari Date: Fri, 7 Feb 2020 12:04:52 +0100 Subject: [PATCH 01/11] 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*tF3NG7Q1DrN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AD3ErVJ7bfQs?^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 + + } } From 6e1f2eb3c588f3a05f0026dbf769a3931795643e Mon Sep 17 00:00:00 2001 From: Adah Boukhari Date: Fri, 7 Feb 2020 15:34:48 +0100 Subject: [PATCH 02/11] Commit_42 (Bugfix) KeyListener in LoginFrame_Class hinzugefuegt. Enter_Key bei Anmelden --- .../bin/MeinBudgetView/LoginFrame.class | Bin 4154 -> 4251 bytes .../src/MeinBudgetView/LoginFrame.java | 19 +++++++++++------- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/Budget Projekt/bin/MeinBudgetView/LoginFrame.class b/Budget Projekt/bin/MeinBudgetView/LoginFrame.class index 97b5f751252a782a9a52dd8e7ec25b7e5637c9c8..f936ee6f74ca14a326aed9899c2fae304b54c1de 100644 GIT binary patch delta 1018 zcmaiyYfO!C9LGQZbLu?Ld3q+xDlOe(Hn1gFp zW4$XX4a;DmZKmTh*-xpp!!j(w^ZviSZnpA=WNW`l(L~X zuOK&NcKX_)yuyNcIR##m8{D*-^l4$Y6fstzJ0{YgnP}UznzYewCA+ujwLCU?!c)ud z-f3kU$q@!`d8g4Oo2@t_Hp=9^4aCUx7R~W)o?f`zYwa@f-CxnewHyV}4&-}yy zd;DaG+nZR!4DtIy#{;3_!77o;L77-TNmiG6u%v}Fb&quQjCrb)`RXGJI3)F%q17Db zh@3iNTEiwzN-kXOW|3qoaLLSR&WIf#dz$2S zr}*qK0nXYGOUfA`5CixF1bjpa&Hz^=-j8Y5qpn`!+VAFaM)&lVF}SC{7BOu`Eb;SP0fHx&n|p+!fFngmaJk z0{ek13db3*r{LzHyp=EgqQ^a&lUOPFkferq@QQFNf;&x_*Ch9h=aP5x;@?C0(zxm` zLyDKYvMM8EO6-4TYYFRueKEnyR1aW92d|~B=;W1HTkTTmvDHo$0pIjD4l}-&d_#N5 zH=vJv6}_bYEoBA_v0nrmg-9`R@}Cpf%viSIVJnl_-b=>R9#pBnP$l${F${-C7mOc5 R+&q7{?f4J3kAlEK_fPi0^=$wE delta 976 zcmaiy$xjqP6oi2%tjjQ_7jPbvHL%@1| z`ixplFW{odCF-qnTCR0k)BO`#lycvr&Bc91iq-B)ahkOA!20D{qxnoa@muM7Ms7Df zE&_`9shafa_MOL%?;VRcq{N^jyWfrAU803b`9BKoN+~gL~>M&KbNY1Iw3*olpG&ysJ zyD}~l&WPOVkhpJMfL2>t3#&y^0B=Wtu6p7`W`I7KH(=WP3H`kc&KG9}i|yKGQX{p^ z#P>5=+QZYrtmpvG?Cu=F?$Xg^zLOYskwFPrlv2QMirFKpz4Gl3cAMr6$qKhC0vTsQ zM3>-Xl9wX;m4KW$GV~nWOyLiAlqXTimRpqd@_MVMLlz-x4T*3-j64{;#FRpph<6D}g`BMX4@EJ<$FP)YVcX^=i(j8Y<}T(-0?|@~a9~`J8Nq&o5ohvlESvCJ-*$)pVgVYtF%?MS6sfzDmL_RFa@Giml5xjiv EA4w?DYybcN diff --git a/Budget Projekt/src/MeinBudgetView/LoginFrame.java b/Budget Projekt/src/MeinBudgetView/LoginFrame.java index 3c34955..017aa30 100644 --- a/Budget Projekt/src/MeinBudgetView/LoginFrame.java +++ b/Budget Projekt/src/MeinBudgetView/LoginFrame.java @@ -74,9 +74,11 @@ public class LoginFrame extends JFrame implements ActionListener, KeyListener { contentPane.add(loginHauptImage); this.anmelden.addActionListener(this); - this.anmelden.addKeyListener(this); passwordField.addActionListener(this); benutzername.addActionListener(this); + this.anmelden.addKeyListener(this); + benutzername.addKeyListener(this); + passwordField.addKeyListener(this); } @Override @@ -107,17 +109,20 @@ public class LoginFrame extends JFrame implements ActionListener, KeyListener { @Override public void keyTyped(KeyEvent e) { - - if (e.getSource() == this.anmelden) { - MeinGui run = new MeinGui(); - run.setVisible(true); - } + // TODO Auto-generated method stub } @Override public void keyPressed(KeyEvent e) { - // TODO Auto-generated method stub + if (e.getKeyCode() == KeyEvent.VK_ENTER) { + if (benutzername.getText().length() > 0 && passwordField.getText().length() > 0) { + MeinGui run = new MeinGui(); + run.setVisible(true); + } else { + JOptionPane.showMessageDialog(this.anmelden, "Bitte geben Sie die richtigen Daten ein!"); + } + } } @Override From 08fd4128403fa887127f3e1c23bff9246153400a Mon Sep 17 00:00:00 2001 From: Adah Boukhari Date: Fri, 7 Feb 2020 21:07:29 +0100 Subject: [PATCH 03/11] Commit_43 Key_1 + message fuer MeinGui class hinzugefuegt --- .../bin/MeinBudgetView/MeinGui$1.class | Bin 1110 -> 1110 bytes .../bin/MeinBudgetView/MeinGui.class | Bin 7284 -> 8042 bytes .../src/MeinBudgetView/MeinGui.java | 34 +++++++++++++++++- 3 files changed, 33 insertions(+), 1 deletion(-) diff --git a/Budget Projekt/bin/MeinBudgetView/MeinGui$1.class b/Budget Projekt/bin/MeinBudgetView/MeinGui$1.class index 4cab5b77a776b4a8f062901eda8cfa7cabe58cf6..93370f55a1229079b31510f98f9c5ac538aeeda4 100644 GIT binary patch delta 37 tcmcb{agAd`GBfW{25yF946+Po7*rUJPA*^$VmvwdFtZ2a`N=#iUI62t3&;Qf delta 37 tcmcb{agAd`GBfXC25yEU46+QT7*rSzPcC2%Vmv>)wf~)2GLy*%nIvoh)Zj))fZ&D-xDdjg0Fr>j1v(@jVRSMRW+sH7qVn9e z?rRmd)}_|^G?5{K`dnJ<^Yy*wLqw}}q4w2kTkUK6tgW^7ckcJiWCr4U^T*upo_p@O zXFuoOSO32Ac>vSpfdD*$QB8IG!bu%rqXuYP6iMZj6DElvE7?p7nHOm;zUg^ zi^Ofgh{l3r6d0Q+@Tcuf>0<sm^tsQfOSlAiqIGAXoB5+5! z!JNCP%Z{h)l#A;C>m#v9yvx#7R83)=t`O z>s6+rn9XnE24e|3)wW(gefFkkS}<&_QFcQ#)fI{L3QBF48->IogbZKnu#y85Ia>tM zK#Ey>LBK_%22@#Dv6j$I0xQy;>Y&(hXF5DPt+&(3NC(#)qSS;43yFp z&5FjO=~D&X>Pagp&74HL9fB7%7LLZmASM&VF+m7|sTS%mjohZ}bW1d?bVpVjz1308 z9d*s=B%NyJq?L+%tcBxnJWWmH276tkJC>dkOQh_jU3M~}uEpc37dp7pEu4sx1jWRy zPjtuIQ`AHCLjESL3}D8APHVg=gp*NI%!5v`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@dRL0H_V;iVm1DN&3Fef zzO`J7cloyW9`55)$`JmH-Fz3(lc{w4;hYTTkI98{5xo_|2H7m1=gCBg4Z=6EZ0;eX zP^uq&jyExfQ2+eiQR&DhG?Umvwp&sXy;xB z>~p|=XN?s`{prn0_t;Lyn_l-Lc8?#^0iW>o>{HC7PA3T8t;K`I;vLgKzX)9oR#7)q zy<)fYv=7O$QHhU8ax%M0No8f*+Uke6XsVNAjFey+UtQE+78%)Q%OGn8&C>5FSLj;C zmI|Ha3gt<5|G$DKV1`(E!7~a3YoRjTFiV_v_rOdQJXyX#RVh0wm;E0KhjBEYN^%Mx XotNv8U6kaJFUl2!{3gU9LjL^~52Khe diff --git a/Budget Projekt/src/MeinBudgetView/MeinGui.java b/Budget Projekt/src/MeinBudgetView/MeinGui.java index 3e90678..8b2304b 100644 --- a/Budget Projekt/src/MeinBudgetView/MeinGui.java +++ b/Budget Projekt/src/MeinBudgetView/MeinGui.java @@ -9,6 +9,8 @@ import javax.swing.JTextField; 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.ImageIcon; import javax.swing.JButton; @@ -29,7 +31,7 @@ import javax.swing.border.BevelBorder; import javax.swing.border.TitledBorder; import javax.swing.UIManager; -public class MeinGui extends JFrame implements ActionListener { +public class MeinGui extends JFrame implements ActionListener, KeyListener { private JPanel contentPane; public static JTextField text1; @@ -208,11 +210,17 @@ public class MeinGui extends JFrame implements ActionListener { scrollPane_1.setViewportView(myTable); text1.addActionListener(this); + text1.addKeyListener(this); text2.addActionListener(this); + text2.addKeyListener(this); senden.addActionListener(this); + senden.addKeyListener(this); berechne.addActionListener(this); + berechne.addKeyListener(this); loeschen.addActionListener(this); + loeschen.addKeyListener(this); exit.addActionListener(this); + exit.addKeyListener(this); } @@ -273,4 +281,28 @@ public class MeinGui extends JFrame implements ActionListener { return result; } + @Override + public void keyTyped(KeyEvent e) { + // TODO Auto-generated method stub + + } + + @Override + public void keyPressed(KeyEvent e) { + + if (e.getKeyCode() == KeyEvent.VK_ENTER) { + if (text1.getText().length() > 0) { + budgetDispaly.setText(setBudgetView()); + } else { + JOptionPane.showMessageDialog(text1, "Füllen Sie alle Felder aus!"); + } + } + } + + @Override + public void keyReleased(KeyEvent e) { + // TODO Auto-generated method stub + + } + } From adb2019f0f1f6505f2b5de4bace4abecc674e8a1 Mon Sep 17 00:00:00 2001 From: Adah Boukhari Date: Sat, 8 Feb 2020 21:50:23 +0100 Subject: [PATCH 04/11] Commit_44 (klicke L um die Eintraege zu leeren) KeyListener --- .../bin/MeinBudgetView/MeinGui.class | Bin 8042 -> 7849 bytes .../src/MeinBudgetView/MeinGui.java | 25 +++++++----------- Command.txt | 3 +++ 3 files changed, 13 insertions(+), 15 deletions(-) create mode 100644 Command.txt diff --git a/Budget Projekt/bin/MeinBudgetView/MeinGui.class b/Budget Projekt/bin/MeinBudgetView/MeinGui.class index 5594c82836097c4e4a7c4e3989ba87216c608cf4..f6f65bc5e5e9e0500e13dce8dbb1219cc08ed5d3 100644 GIT binary patch delta 272 zcmaE5x6)SN)W2Q(7#JAL7^kr_FflTSP2R{Ywo&bZz~)JUM%-pq3`{^t1_rxL42438 z+Zb~fp7=3-!E_zR?g001f6FS-B# delta 444 zcmXAjO-mb56o%h-YLhsIno=53CTZeVO)W%R*rM1?OTf~iAh;~v>LrPcGwMu@8*#0; zu~WZWt1EGt2tkUt>8`6##2?Wg&|RfR<}B`WKJI<)IUD`+D)H;~#}$AfoilnFuw}r9A*%x~YglBR^EFgLGz4Qc{0?y);)cNotFt}I z`*^?z9y1DyF?6vR&uHSs`Mx#HwN-K6S^N9z+)S9q=oWdM!*zZ>LTe3;3l>Cvin#P2 zar=V1Rk?nTmYf}k0PI0Cd&U10Y4#z@ocNzJCG%vcW|~i=l25qK4Ui?tn_y&P;^DVo aBHhWsppi 0) { - budgetDispaly.setText(setBudgetView()); - } else { - JOptionPane.showMessageDialog(text1, "Füllen Sie alle Felder aus!"); - } + if (e.getKeyCode() == KeyEvent.VK_L) { + leeren(); } } @Override public void keyReleased(KeyEvent e) { // TODO Auto-generated method stub - + } } diff --git a/Command.txt b/Command.txt new file mode 100644 index 0000000..f5253bd --- /dev/null +++ b/Command.txt @@ -0,0 +1,3 @@ +Befehle: + +L: Alle Einträge leeren From 2fd5b9bb173d2df5e56fcb16e96ad4e4f47cd961 Mon Sep 17 00:00:00 2001 From: Adah Boukhari Date: Sat, 8 Feb 2020 22:14:44 +0100 Subject: [PATCH 05/11] Commit_45 (klicke F5 fuer Exit) KeyListener und Methode benutzernameLeeren() implementiert und getestet --- .../bin/MeinBudgetView/LoginFrame.class | Bin 4251 -> 4382 bytes .../bin/MeinBudgetView/MeinGui.class | Bin 7849 -> 7870 bytes .../bin/MeinBudgetView/MyTest.class | Bin 2171 -> 2479 bytes .../src/MeinBudgetView/LoginFrame.java | 8 ++++++++ .../src/MeinBudgetView/MeinGui.java | 4 ++++ Budget Projekt/src/MeinBudgetView/MyTest.java | 10 ++++++++++ Command.txt | 1 + 7 files changed, 23 insertions(+) diff --git a/Budget Projekt/bin/MeinBudgetView/LoginFrame.class b/Budget Projekt/bin/MeinBudgetView/LoginFrame.class index f936ee6f74ca14a326aed9899c2fae304b54c1de..e2944f3e909aa9625cb52f760206b2fb53c863d9 100644 GIT binary patch delta 316 zcmXYryGjF55Qe{#O-!;0Bt))KQi<^i zbn${H_y87atzzT-@(kj*I>kTCHpcu2c#qQ)tYzF>ov=m2riis&j?sti(Nm^yjZD6q~L4aRA*D^tCH z=V-Ghl^o`ddz9=%xZ+yuZiGfK^0B1gH*Q5c1&x5`q`K6Gx0&iL#ChlVztb=IH;jxv UkQ54j>ImRg;29FC_y~HRKQC-Vi2wiq delta 149 zcmbQIG+UAD)W2Q(7#JAL7@lq9n#0A%$iSVQS{am@lbTqZnlkwVmmeehW_#}SES$3$ zm>8IWDy=7f=eOeB2xKuc%mb2g4D6G=1!Rrq1KA1?6$}d)76N%dwG6iz?l3SiXfm)e poMSi-G~ohJl!bxGkOL_Cc=8efCB~M?#|30L85y1cWtbSA0su7OA`<`r diff --git a/Budget Projekt/bin/MeinBudgetView/MeinGui.class b/Budget Projekt/bin/MeinBudgetView/MeinGui.class index f6f65bc5e5e9e0500e13dce8dbb1219cc08ed5d3..1ae2f76327274052b519fe9e6dbda57cf82dbdcc 100644 GIT binary patch delta 126 zcmZ2!yU%vRPuYxg1|}e6V35?_#@Hj^vw(qZ2crd;T>@sCZUjm)Gs*x-F$Pu!21XSI zPDWJ*9!7NrQAQ002}W&3S+E?~5Jovhc_0sH9AhVA7Xu?>29V9dz{JBn*+))|(Qxtw KS=q@GUPubug1|}e6VBpo>#@Hj^vw(qZ2cyMCpa3(Y43OkwU}j)oRAJy`RAt~{ xRA-b0iitrqFv>B?19?ELjGc^K42+B!KsGZ2BhTbSIW+2!2gQdn%UANNmgQkb@w-oYN?dr1*BmzV!7^pa#0GA-PvQ0(`s7O^ delta 36 scmZ24{9AzQ)W2Q(7#JAL7^*jN>99^d$Ew1}w)r!wG&3s$0~13P0PeyHkN^Mx diff --git a/Budget Projekt/src/MeinBudgetView/LoginFrame.java b/Budget Projekt/src/MeinBudgetView/LoginFrame.java index 017aa30..8b973fb 100644 --- a/Budget Projekt/src/MeinBudgetView/LoginFrame.java +++ b/Budget Projekt/src/MeinBudgetView/LoginFrame.java @@ -123,6 +123,10 @@ public class LoginFrame extends JFrame implements ActionListener, KeyListener { JOptionPane.showMessageDialog(this.anmelden, "Bitte geben Sie die richtigen Daten ein!"); } } + if (e.getKeyCode() == KeyEvent.VK_F5) { + System.exit(0); + } + } @Override @@ -130,4 +134,8 @@ public class LoginFrame extends JFrame implements ActionListener, KeyListener { // TODO Auto-generated method stub } + + public static String benutzernameLeeren() { + return ""; + } } diff --git a/Budget Projekt/src/MeinBudgetView/MeinGui.java b/Budget Projekt/src/MeinBudgetView/MeinGui.java index 127f04b..c43e841 100644 --- a/Budget Projekt/src/MeinBudgetView/MeinGui.java +++ b/Budget Projekt/src/MeinBudgetView/MeinGui.java @@ -292,6 +292,10 @@ public class MeinGui extends JFrame implements ActionListener, KeyListener { if (e.getKeyCode() == KeyEvent.VK_L) { leeren(); } + if (e.getKeyCode() == KeyEvent.VK_F5) { + exitButton(); + } + } @Override diff --git a/Budget Projekt/src/MeinBudgetView/MyTest.java b/Budget Projekt/src/MeinBudgetView/MyTest.java index a4a5e72..54817c2 100644 --- a/Budget Projekt/src/MeinBudgetView/MyTest.java +++ b/Budget Projekt/src/MeinBudgetView/MyTest.java @@ -63,5 +63,15 @@ class MyTest { assertNotEquals(null, LoginFrame.setPassword()); } + + @Test + public void testSetLeeren() { + + assertEquals("", LoginFrame.benutzernameLeeren()); + assertNotEquals(" ", LoginFrame.benutzernameLeeren()); + assertNotEquals("".length() > 0 , LoginFrame.benutzernameLeeren()); + assertNotEquals(""==null, LoginFrame.benutzernameLeeren()); + + } } diff --git a/Command.txt b/Command.txt index f5253bd..0c56c72 100644 --- a/Command.txt +++ b/Command.txt @@ -1,3 +1,4 @@ Befehle: L: Alle Einträge leeren +F5: Exit From 10eb27c5d8fa6f4dd564cc9a18e4611ab0bbd3ae Mon Sep 17 00:00:00 2001 From: Adah Boukhari Date: Sun, 9 Feb 2020 12:50:47 +0100 Subject: [PATCH 06/11] Commit_46 Methode setBenutzername() bearbeitet und wieder getestet --- .../bin/MeinBudgetView/LoginFrame.class | Bin 4382 -> 4429 bytes .../bin/MeinBudgetView/MyTest.class | Bin 2479 -> 2115 bytes .../src/MeinBudgetView/LoginFrame.java | 27 ++++++++++-------- Budget Projekt/src/MeinBudgetView/MyTest.java | 27 +++++++++++------- 4 files changed, 32 insertions(+), 22 deletions(-) diff --git a/Budget Projekt/bin/MeinBudgetView/LoginFrame.class b/Budget Projekt/bin/MeinBudgetView/LoginFrame.class index e2944f3e909aa9625cb52f760206b2fb53c863d9..1b54685c457116efc6ee6934b8f31e9cf6bfa6d4 100644 GIT binary patch delta 634 zcmaKo%WG3n5XOHe?_95VY0*WZ^q~m#Rq8@fmjzu|q}qyfd7B(U+U5pwZ`!0NQE(-= zy89Y8BDk>?Ls9S#5PZL?RqMOj`dSJF@!XRlt~`r5GxN=S^UX|k-sv=M|Gsex*u&3h z<8m@A*y@XD${e$uT=#%i$~(CO{;%ZbwggWFQ9E16I|fIXGkH#05O<|FC@Y?yHilwv zco*lbKWS{Nz2~OD$Vu<8to9bO(%>VDaXtyG5qsS3Zt_=MPZmr*(O5QUNESW5G zU9f3bI%RKCmK?hvk2~3Z+jS?3rEH&+C8b*q2HO7AUdV1q6c)VUZ?DflI?loh;QEk@llL|9>&?F|E-Lg;Wj`nB z@QkdTF?J;n(vAy#E(Bs9gyz; delta 588 zcma)&%}Z2a6vlt=jC#AT15OP|iz2m>rYLbyQZ9uO6a-sH%WED7$LU7noyoCipjFWF z?#*^V8>h&I1pk1bFZh|b(fTt%Dnyytn(d7g)JziqnB-uroX0XWQ$ioNb0 zv)tiHf~Pz)I7Kg4kbzM{``-SnSM)k^o}cL$7|zP6pgX;RIuYc@{7ko@Aukh!To5k1 zyTTpzWW!tDJG=`o*zMasFmJFK3Hqeeb7n*=pICMH9M0OU2fnb=P$!dPfuV6+N`sOU zZ$d^4TZY9i1XGgtz0=Y!k{AD0qH#}M+2t{}F{Ctom!eU0Z!%P6v2Wk3HZi8PT15~X zM!Bl5gbq5&J?DjXE-(LIB&&<#e?^iTR1B|J3U4&Ebe)a9nX)HU5Tb@ LcQvd<%in(i*(rWL diff --git a/Budget Projekt/bin/MeinBudgetView/MyTest.class b/Budget Projekt/bin/MeinBudgetView/MyTest.class index c42fa33bf26dd962efe7bbc8b1fca2312741bdaf..a9549810292ecc1e3cd603a0e7150efc3d370663 100644 GIT binary patch literal 2115 zcmZvcT~ixX7{~tyLb8OVz&52)fg)BCD3I{lLa>I{77Z`*61CRKCOL+sVK;0xP|&N+ z=oj!_FTL?Xr!zI41N~hIN#%CCxie)=aGJ@$BVjIh;L<&c+O!6E*PfaJYr~$4QChv%T}I; z(Tr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Q6O(J#;x#K<*kR?5D~;;%B{aPC+)n<>lmfQq0zC?N|s(Wa9(9;ugX%zkdAR)R7Vx2j>&KpfUvVP zrSmcNg%~rTmw@Bjd7neaWr61Yq2aS56`wN(W|hxY`mDaCV_xx<&o(B0`YW`OR8~gL z4i5!ZbSyF#{zkxegBL^nGf>mgE_mD0wasn!d{ z)jffOekHf!`Azmp{FNoS<;_|$n`YbG#v2;$Jo5^JmNM`r-eR6M%xpnkzbnvFqeE(T zVhZmVc(;_G>IgKf@Hy^o-syssO-nZd6KVCp`JDGx`wClJ^#t*&cu zNR{wo1D{}r{8?#dynFuKyc)r0c%HmV0aHGs~kJ@<~O;v?)fpV)%sXDiG*V`|RFmmZ$TZo3grb=);)SB~O%p_qh5auFbE)izxe_$TggxLuz zHy+(C;(b-KyS|J?x1Zpn@1QmOfQI@aJ}vG3v3pB#)%(vXNYX4jYmS{g&kA0}7_L>- ZX*^8Qm%O8+p(`QU6Dm<(ab1V6{{{MU8W#Wn diff --git a/Budget Projekt/src/MeinBudgetView/LoginFrame.java b/Budget Projekt/src/MeinBudgetView/LoginFrame.java index 8b973fb..2e256db 100644 --- a/Budget Projekt/src/MeinBudgetView/LoginFrame.java +++ b/Budget Projekt/src/MeinBudgetView/LoginFrame.java @@ -97,14 +97,12 @@ public class LoginFrame extends JFrame implements ActionListener, KeyListener { } - public static String setBenutzername() { - String result = String.valueOf(benutzername); - return result; + protected static String setBenutzername(String benutzername) { + return benutzername; } - public static String setPassword() { - String result = String.valueOf(benutzername); - return result; + protected static void setPassword() { + passwordField.setText("admin"); } @Override @@ -114,10 +112,10 @@ public class LoginFrame extends JFrame implements ActionListener, KeyListener { @Override public void keyPressed(KeyEvent e) { - + if (e.getKeyCode() == KeyEvent.VK_ENTER) { if (benutzername.getText().length() > 0 && passwordField.getText().length() > 0) { - MeinGui run = new MeinGui(); + MeinGui run = new MeinGui(); run.setVisible(true); } else { JOptionPane.showMessageDialog(this.anmelden, "Bitte geben Sie die richtigen Daten ein!"); @@ -126,16 +124,21 @@ public class LoginFrame extends JFrame implements ActionListener, KeyListener { if (e.getKeyCode() == KeyEvent.VK_F5) { System.exit(0); } - + if (e.getKeyCode() == KeyEvent.VK_L) { + benutzername.setText(benutzernameUndPasswordLeeren()); + passwordField.setText(benutzernameUndPasswordLeeren()); + } + } @Override public void keyReleased(KeyEvent e) { // TODO Auto-generated method stub - + } - public static String benutzernameLeeren() { - return ""; + public static String benutzernameUndPasswordLeeren() { + return ""; } + } diff --git a/Budget Projekt/src/MeinBudgetView/MyTest.java b/Budget Projekt/src/MeinBudgetView/MyTest.java index 54817c2..c77cf52 100644 --- a/Budget Projekt/src/MeinBudgetView/MyTest.java +++ b/Budget Projekt/src/MeinBudgetView/MyTest.java @@ -1,5 +1,6 @@ package MeinBudgetView; +import static org.junit.Assert.assertEquals; import static org.junit.jupiter.api.Assertions.*; import org.junit.jupiter.api.Test; @@ -48,13 +49,19 @@ class MyTest { @Test public void testSetBenutzername() { - String result = String.valueOf(LoginFrame.benutzername); - assertEquals(result, LoginFrame.setBenutzername()); - assertNotEquals(result + " ", LoginFrame.setBenutzername()); - assertNotEquals(null, LoginFrame.setBenutzername()); - + + assertEquals("admin", LoginFrame.setBenutzername("admin")); + assertEquals("ADMIN", LoginFrame.setBenutzername("ADMIN")); + assertNotEquals("Admin", LoginFrame.setBenutzername("")); + assertNotEquals("admin", LoginFrame.setBenutzername("Admin")); + assertNotEquals("", LoginFrame.setBenutzername("admin")); + assertEquals("ADMin".toUpperCase(), LoginFrame.setBenutzername("admin").toUpperCase()); + + + } + /** @Test public void testSetPassword() { String result = String.valueOf(LoginFrame.passwordField); @@ -63,14 +70,14 @@ class MyTest { assertNotEquals(null, LoginFrame.setPassword()); } - + */ @Test public void testSetLeeren() { - assertEquals("", LoginFrame.benutzernameLeeren()); - assertNotEquals(" ", LoginFrame.benutzernameLeeren()); - assertNotEquals("".length() > 0 , LoginFrame.benutzernameLeeren()); - assertNotEquals(""==null, LoginFrame.benutzernameLeeren()); + assertEquals("", LoginFrame.benutzernameUndPasswordLeeren()); + assertNotEquals(" ", LoginFrame.benutzernameUndPasswordLeeren()); + assertNotEquals("".length() > 0 , LoginFrame.benutzernameUndPasswordLeeren()); + assertNotEquals(""==null, LoginFrame.benutzernameUndPasswordLeeren()); } From 338ecf48347a4954483904ce0a4d31765e10ccd0 Mon Sep 17 00:00:00 2001 From: Adah Boukhari Date: Sun, 9 Feb 2020 12:55:00 +0100 Subject: [PATCH 07/11] Commit_47 Methode setPassword bearbeitet und wieder getestet --- .../bin/MeinBudgetView/LoginFrame.class | Bin 4429 -> 4428 bytes .../bin/MeinBudgetView/MyTest.class | Bin 2115 -> 2362 bytes .../src/MeinBudgetView/LoginFrame.java | 4 ++-- Budget Projekt/src/MeinBudgetView/MyTest.java | 17 ++++++++++------- 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/Budget Projekt/bin/MeinBudgetView/LoginFrame.class b/Budget Projekt/bin/MeinBudgetView/LoginFrame.class index 1b54685c457116efc6ee6934b8f31e9cf6bfa6d4..b4eb77a82c295f1213ae5dffc2b7bbaaa69a1a5f 100644 GIT binary patch delta 301 zcmX9(%Sr=55Ukm(ne4cbQCW#Eq6-S*MGuOeJt~3_5O0bZB&VpmU14I0o5krilhn=&h_O{ z(uN%AE=fNN9xCAWeTrl7@;N4-FwB97-Ae8s Y)yz))D`QqoY0(SK4gLI+bOyfu0MuVs6#xJL delta 348 zcmXYs%S%F05XQgb>)v~~(9IB{f?GmCL|B_B2wJo(f=Gx~amj-zX@r;1zvJx7bvq42 z3fi=bUYk<0viJM7a4k*OHp9#}-~49gFnAQ?2aTOQ03-Ox@w#TJIA`!$kwh%XF@v&> z3OX5-l(54hZA*GVrLdr$lCQH6l13@vPv9!H8SyR%pdaMniL% zlr0iEUSKkKL^@`3Fudt_m;1brmA4yw%`@&Nt&J`jgo`4eHv6p$Q|NsZ?ska#q0s zgHjr>0x?rdSz6I#OPZF7B_awAEltyEF>|gmm`h|C-2J_qLX?HBB84LtYVa{k>g9wgw0h6QZ@aa`;h-cp|eX*|S6LUcVeiPI_WegM{MX(a#v delta 254 zcmZ9HyGjE=6hO~pXOm^zg=C9Vf)+ljbb>YpJHZ!Ph*oYfMB+ND$rzvDKbTruD~q7W zlETJ9@T0`r*jU_ixTm^zoPO5L_s{qPSmJJEW_2_1w(s|>->|l4onfDon0)xCXI7m; zO&cs{G3WFY)!e#{KUM?_i|Yo@pvHxw(ai=~E6-e~wN@0l&0NeSR}bNVs=gkEZVuc35VY38^tkxFSx( T*D?`$vaK3z`G6bQE2!IFWyv-v diff --git a/Budget Projekt/src/MeinBudgetView/LoginFrame.java b/Budget Projekt/src/MeinBudgetView/LoginFrame.java index 2e256db..01b9e07 100644 --- a/Budget Projekt/src/MeinBudgetView/LoginFrame.java +++ b/Budget Projekt/src/MeinBudgetView/LoginFrame.java @@ -101,8 +101,8 @@ public class LoginFrame extends JFrame implements ActionListener, KeyListener { return benutzername; } - protected static void setPassword() { - passwordField.setText("admin"); + protected static String setPassword(String password) { + return password; } @Override diff --git a/Budget Projekt/src/MeinBudgetView/MyTest.java b/Budget Projekt/src/MeinBudgetView/MyTest.java index c77cf52..fb3afec 100644 --- a/Budget Projekt/src/MeinBudgetView/MyTest.java +++ b/Budget Projekt/src/MeinBudgetView/MyTest.java @@ -61,16 +61,19 @@ class MyTest { } - /** + @Test public void testSetPassword() { - String result = String.valueOf(LoginFrame.passwordField); - assertEquals(result, LoginFrame.setPassword()); - assertNotEquals(result + " ", LoginFrame.setPassword()); - assertNotEquals(null, LoginFrame.setPassword()); - + + assertEquals("password", LoginFrame.setBenutzername("password")); + assertEquals("PassWord", LoginFrame.setBenutzername("PassWord")); + assertNotEquals("password", LoginFrame.setBenutzername("")); + assertNotEquals("PASSWORD", LoginFrame.setBenutzername("password")); + assertNotEquals("", LoginFrame.setBenutzername("password")); + assertEquals("PaSSwOrd".toUpperCase(), LoginFrame.setBenutzername("passwoRd").toUpperCase()); + } - */ + @Test public void testSetLeeren() { From c4898dadce14365268de744edb8040696d50da4a Mon Sep 17 00:00:00 2001 From: Adah Boukhari Date: Sun, 9 Feb 2020 13:42:47 +0100 Subject: [PATCH 08/11] Commit_48 Benutzername = admin && password = admin --- .../bin/MeinBudgetView/LoginFrame.class | Bin 4428 -> 4572 bytes .../src/MeinBudgetView/LoginFrame.java | 6 +++--- Command.txt | 3 +++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Budget Projekt/bin/MeinBudgetView/LoginFrame.class b/Budget Projekt/bin/MeinBudgetView/LoginFrame.class index b4eb77a82c295f1213ae5dffc2b7bbaaa69a1a5f..0ea254134a57b0fba7f1230bf05b0e4adfeb8ec5 100644 GIT binary patch delta 788 zcmY+B$xl;J6ow=iLqnbj*VPQl?#CZlMoaX_>k$Br0shgAgyJ!5)8Oz?pIP| zyMqjOGCC_h3~lt|W@LC*HEC_+V)<1uxi58Du9)dO5E&rgkV zrC;Qj*e`4@7GbN%U<*#F$)}c5wo=J9@!HM~>Ny}HauR(Ab5JPJksI6;Q`VBkEpCfB z?pVcl8YZWuki_L$txJq5t4+Qu9P#5Bt=58!d&IQFI1|QUYjNm44}_9<$b_)j!Z-Ps z%9j`AkxdD+CJ8LcvtE`au|;{+OZIZK~BYM=wZyJLEgnhSs1%0ILPNH zUn3SO;;-*Uoo!xS9-S1@MKRsD=wU6pC}%engs5Q;9`@40zND4-{;kAE0;Oqi!39y=5yb^}T;rQh#;;Rj%FE5Y=icw!bM80qpI)m@{keP<=;Y^^ z>QJg>Zb&qm3reF$WfEU0+}4=ljyb9vGyTd|zeIh{(MUQHI37vF1N)4@fkb?}ggd1h zy^&NZlN^khtJPR!o>ww2C7SHvNX7{0X+2>CcIvsVQljyiaS1i98v+U?W4g)$?_}Oe zcq=~S-cz$v`- zo4;#2+tw8bTNEs;Gps7G*J8rXz2i*wUE=1hjV_B@<^j)|9U%^~hkn8w64?<(1xZVp ziacjUB}kd(t`HKYihIn6Rrdv2h0|XXK;r=q%?VFXc_cuM$9C0fHhF8^Pbgs$Pnk74 zyjzBzF()dC=gf-OAbNBEbVoN>yzr`dHdjb*u8`iaMEZHO^%v=`zf$Cy{nE%IJBz%r zi=I3_K~v;|#b?1`Ctt@fe|eW3ZY51S88(q6NRDlsB*ZDY8KReA`Zz7lFj8@d=>J1R oDLZIia)@eN!5VFaaP-ag* 0 - && passwordField.getText().length() > 0) { + if (ae.getSource() == this.anmelden && benutzername.getText() != setBenutzername("admin") + && passwordField.getText() != setPassword("admin")) { MeinGui run = new MeinGui(); run.setVisible(true); @@ -114,7 +114,7 @@ public class LoginFrame extends JFrame implements ActionListener, KeyListener { public void keyPressed(KeyEvent e) { if (e.getKeyCode() == KeyEvent.VK_ENTER) { - if (benutzername.getText().length() > 0 && passwordField.getText().length() > 0) { + if (benutzername.getText().contentEquals(setBenutzername("admin")) && passwordField.getText().equals(setPassword("admin"))) { MeinGui run = new MeinGui(); run.setVisible(true); } else { diff --git a/Command.txt b/Command.txt index 0c56c72..9602535 100644 --- a/Command.txt +++ b/Command.txt @@ -1,4 +1,7 @@ Befehle: +1)Benutzername: admin +2)Password: admin + L: Alle Einträge leeren F5: Exit From 7c04c7cda2fdf143d02924d5a634acff3c8e901c Mon Sep 17 00:00:00 2001 From: Adah Boukhari Date: Sun, 9 Feb 2020 16:01:09 +0100 Subject: [PATCH 09/11] Commit_49 JLabel _F5:Exit_ hinzugefuegt --- .../bin/MeinBudgetView/LoginFrame.class | Bin 4572 -> 4685 bytes .../bin/MeinBudgetView/MeinGui.class | Bin 7870 -> 7870 bytes .../bin/MeinBudgetView/MyTest.class | Bin 2362 -> 2362 bytes .../src/MeinBudgetView/LoginFrame.java | 17 +++++++++----- .../src/MeinBudgetView/MeinGui.java | 5 ++--- Budget Projekt/src/MeinBudgetView/MyTest.java | 21 ++++++++---------- Command.txt | 2 +- 7 files changed, 23 insertions(+), 22 deletions(-) diff --git a/Budget Projekt/bin/MeinBudgetView/LoginFrame.class b/Budget Projekt/bin/MeinBudgetView/LoginFrame.class index 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sx4Dy-_TvTpr+sR~659W|qpD=x*lw-tWEUdEV!n z9ksh-#>k(WwgBhw$AB?2Xc#nLo7~Mk_Wa=a5!+xfvNVu0S6o z7qqj2Pw|Y#)AkWVGIjmgerVtKNyHL)nOBGuMv zvWa1Pr5+6o>1?rA=`({{c}e3%dsIKw|1z)GhxCi0+Y}YamUODkK=GQ%>x|fQLvw51 zFxkO~BHUqR79=}5y4qK?XuPSYw*LxMPcayy%30nqd6)O>&7pmB_HjUCzv5&UNwO=G zusW@_OyV-DXP#r29AsEwv|1T)HMF-_1_eGh`GPO)apMfVz+scG_}Y$!V~KA$qVZih zubz&Kl{WdFX^Mc=oys_%e>C|?W?_YEt0qi-;S_}?pch-+5^iF`UK>ssz6mt>qYe(8 zWERzVbsM>)F3(+qG|P7HAWLMsujF0j9oKll2L?nwA8TbDByP_-F_+y+quNfB8e_iN z$pW>9W_5stJSaJrdat3EhvYP_3?AkYfq9g}JSvt?)i6q*SbjB!$5=-{0hOkk_2R2g zcXEYz`w2?T<2)g2RQhZa1b*3*Gx9u{b#ShuR$%5C%#+VCMX=_1UhLJFPPlS&kr$j~ zFE{SxR=!$fdmmH1Z09uEM`W0>r3Kzs=y!9>v6AGiB(*7B_Utk24{8O>hK23 zZESi`PT(W)xi?Zg(X1T)yEIi+I_{P#cC*JRmCCc_@yVn9(baoryIWZ81t-ZUKIRiC zReXA^MV9@NyKXl>5t7+8fFAqWOz_<2Jm! zmnvykwSmY#Fd5L JB*n+?e*?WPMKu5b diff --git a/Budget Projekt/bin/MeinBudgetView/MeinGui.class b/Budget Projekt/bin/MeinBudgetView/MeinGui.class index 1ae2f76327274052b519fe9e6dbda57cf82dbdcc..9f008b2bda6c0c5a3af34d4aead22c869410bd7f 100644 GIT binary patch delta 51 zcmdmIyU%vRd09sJ$rohJ8S5u=$SDabGjKAhFz_&{F^Dp%Ge|IMO}3WvVKe}$ke$3# GP7(lP7z|GU delta 51 zcmdmIyU%vRd09q<$rohJ8GR;m$SDb`FmN)eGVm~}Gl(*3Fi0?JPqvoxVKfA)ke$3# GP7(lIU<@Mw diff --git a/Budget Projekt/bin/MeinBudgetView/MyTest.class b/Budget Projekt/bin/MeinBudgetView/MyTest.class index 23c120bf70f1468e913c2d9c6e1f967958c0539a..d118b035a92158f056e9c266c26709465f4e5887 100644 GIT binary patch delta 65 zcmdlbv`c8iBX&lc$&cCFBpn&J7@QbH7@Qg87+e@M7+e{Q7~Fs&9+R6mY6X26I2imG U1Q`4o)EEL7EE$3(3vg-y0P+nC!~g&Q delta 65 zcmdlbv`c8iBX&l+$&cCFBwZM|7+e`d7~B}-7~B~&7(5t^7(5xA7`!JpanuS1FmNyg VG6*mPF{m*FGgvZ&P8Q(Q0s!`P4C(*? diff --git a/Budget Projekt/src/MeinBudgetView/LoginFrame.java b/Budget Projekt/src/MeinBudgetView/LoginFrame.java index d7bbd9e..231270f 100644 --- a/Budget Projekt/src/MeinBudgetView/LoginFrame.java +++ b/Budget Projekt/src/MeinBudgetView/LoginFrame.java @@ -72,6 +72,11 @@ public class LoginFrame extends JFrame implements ActionListener, KeyListener { loginHauptImage.setIcon(new ImageIcon(image2)); loginHauptImage.setFont(new Font("Tahoma", Font.BOLD, 13)); contentPane.add(loginHauptImage); + + JLabel lblNewLabel_1 = new JLabel("F5: exit"); + lblNewLabel_1.setFont(new Font("Tahoma", Font.BOLD, 11)); + lblNewLabel_1.setBounds(342, 213, 82, 14); + contentPane.add(lblNewLabel_1); this.anmelden.addActionListener(this); passwordField.addActionListener(this); @@ -97,12 +102,12 @@ public class LoginFrame extends JFrame implements ActionListener, KeyListener { } - protected static String setBenutzername(String benutzername) { - return benutzername; + protected static String setBenutzername(String benutzername) { + return benutzername; } protected static String setPassword(String password) { - return password; + return password; } @Override @@ -114,7 +119,8 @@ public class LoginFrame extends JFrame implements ActionListener, KeyListener { public void keyPressed(KeyEvent e) { if (e.getKeyCode() == KeyEvent.VK_ENTER) { - if (benutzername.getText().contentEquals(setBenutzername("admin")) && passwordField.getText().equals(setPassword("admin"))) { + if (benutzername.getText().contentEquals(setBenutzername("admin")) + && passwordField.getText().equals(setPassword("admin"))) { MeinGui run = new MeinGui(); run.setVisible(true); } else { @@ -124,7 +130,7 @@ public class LoginFrame extends JFrame implements ActionListener, KeyListener { if (e.getKeyCode() == KeyEvent.VK_F5) { System.exit(0); } - if (e.getKeyCode() == KeyEvent.VK_L) { + if (e.getKeyCode() == KeyEvent.VK_DELETE) { benutzername.setText(benutzernameUndPasswordLeeren()); passwordField.setText(benutzernameUndPasswordLeeren()); } @@ -140,5 +146,4 @@ public class LoginFrame extends JFrame implements ActionListener, KeyListener { public static String benutzernameUndPasswordLeeren() { return ""; } - } diff --git a/Budget Projekt/src/MeinBudgetView/MeinGui.java b/Budget Projekt/src/MeinBudgetView/MeinGui.java index c43e841..ad03c89 100644 --- a/Budget Projekt/src/MeinBudgetView/MeinGui.java +++ b/Budget Projekt/src/MeinBudgetView/MeinGui.java @@ -283,19 +283,18 @@ public class MeinGui extends JFrame implements ActionListener, KeyListener { @Override public void keyTyped(KeyEvent e) { - } @Override public void keyPressed(KeyEvent e) { - if (e.getKeyCode() == KeyEvent.VK_L) { + if (e.getKeyCode() == KeyEvent.VK_DELETE) { leeren(); } if (e.getKeyCode() == KeyEvent.VK_F5) { exitButton(); } - + } @Override diff --git a/Budget Projekt/src/MeinBudgetView/MyTest.java b/Budget Projekt/src/MeinBudgetView/MyTest.java index fb3afec..9542243 100644 --- a/Budget Projekt/src/MeinBudgetView/MyTest.java +++ b/Budget Projekt/src/MeinBudgetView/MyTest.java @@ -49,39 +49,36 @@ class MyTest { @Test public void testSetBenutzername() { - + assertEquals("admin", LoginFrame.setBenutzername("admin")); assertEquals("ADMIN", LoginFrame.setBenutzername("ADMIN")); assertNotEquals("Admin", LoginFrame.setBenutzername("")); assertNotEquals("admin", LoginFrame.setBenutzername("Admin")); assertNotEquals("", LoginFrame.setBenutzername("admin")); assertEquals("ADMin".toUpperCase(), LoginFrame.setBenutzername("admin").toUpperCase()); - - - + } - @Test public void testSetPassword() { - + assertEquals("password", LoginFrame.setBenutzername("password")); assertEquals("PassWord", LoginFrame.setBenutzername("PassWord")); assertNotEquals("password", LoginFrame.setBenutzername("")); assertNotEquals("PASSWORD", LoginFrame.setBenutzername("password")); assertNotEquals("", LoginFrame.setBenutzername("password")); assertEquals("PaSSwOrd".toUpperCase(), LoginFrame.setBenutzername("passwoRd").toUpperCase()); - + } - + @Test public void testSetLeeren() { - + assertEquals("", LoginFrame.benutzernameUndPasswordLeeren()); assertNotEquals(" ", LoginFrame.benutzernameUndPasswordLeeren()); - assertNotEquals("".length() > 0 , LoginFrame.benutzernameUndPasswordLeeren()); - assertNotEquals(""==null, LoginFrame.benutzernameUndPasswordLeeren()); - + assertNotEquals("".length() > 0, LoginFrame.benutzernameUndPasswordLeeren()); + assertNotEquals("" == null, LoginFrame.benutzernameUndPasswordLeeren()); + } } diff --git a/Command.txt b/Command.txt index 9602535..079746a 100644 --- a/Command.txt +++ b/Command.txt @@ -3,5 +3,5 @@ Befehle: 1)Benutzername: admin 2)Password: admin -L: Alle Einträge leeren +DELETE_Taste: Alle Einträge leeren F5: Exit From 5486481dc4d3d719bbe89f775d19b4e3dcb86fa1 Mon Sep 17 00:00:00 2001 From: Adah Boukhari Date: Sun, 9 Feb 2020 16:05:06 +0100 Subject: [PATCH 10/11] Commit_50 JLabel _Ent:Leeren_ hinzugefuegt --- .../bin/MeinBudgetView/LoginFrame.class | Bin 4685 -> 4801 bytes .../src/MeinBudgetView/LoginFrame.java | 13 +++++++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/Budget Projekt/bin/MeinBudgetView/LoginFrame.class b/Budget Projekt/bin/MeinBudgetView/LoginFrame.class index 2254de99f30194a8b1ab9dcfd59862e8dab673f3..b56d6dbbf47790c0c4b4b4cb63de85ea6cfb1500 100644 GIT binary patch delta 1506 zcmai!Yfx2H6vu!2T)5}l%Mq^Jfr1)v#Ksw;V8#z8Q+!1aGf?=aa(mp#$Q%j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ymu6U+@2;D1mnqvLbiWM~Ks>OC6U>jPx)sm#2uO^?Pkj>7HnaEi~^tH+KV z*F3_P@^ItiVuaIwCvNvSgHjb=uve;^>wdwwu{KCl`=VAG=NuE1!#6E%%5Jh=Rt^VR z$Q~8fn*ZW%_VV5rO|@YLyEx=Ail`i6?BZ94KZMC^j*MhnC~jd1VQwJCjZEVv3b>gf zZlRcF&f`|*a2s>Eoh!IQLcfzFOOJ`Y;a`7wGz=Ro7?rz0T5-sZiQ&Kepr*IUm45K| b{%=rW@1MIn>-ZB!PH69hAM8=#3Gnwnc@sm^ diff --git a/Budget Projekt/src/MeinBudgetView/LoginFrame.java b/Budget Projekt/src/MeinBudgetView/LoginFrame.java index 231270f..a61a073 100644 --- a/Budget Projekt/src/MeinBudgetView/LoginFrame.java +++ b/Budget Projekt/src/MeinBudgetView/LoginFrame.java @@ -73,10 +73,15 @@ public class LoginFrame extends JFrame implements ActionListener, KeyListener { loginHauptImage.setFont(new Font("Tahoma", Font.BOLD, 13)); contentPane.add(loginHauptImage); - JLabel lblNewLabel_1 = new JLabel("F5: exit"); - lblNewLabel_1.setFont(new Font("Tahoma", Font.BOLD, 11)); - lblNewLabel_1.setBounds(342, 213, 82, 14); - contentPane.add(lblNewLabel_1); + JLabel F5_ExitLabel = new JLabel("F5: exit"); + F5_ExitLabel.setFont(new Font("Tahoma", Font.BOLD, 11)); + F5_ExitLabel.setBounds(342, 237, 82, 14); + contentPane.add(F5_ExitLabel); + + JLabel entfLeerenLabel = new JLabel("Entf: Leeren\r\n"); + entfLeerenLabel.setFont(new Font("Tahoma", Font.BOLD, 11)); + entfLeerenLabel.setBounds(342, 223, 82, 14); + contentPane.add(entfLeerenLabel); this.anmelden.addActionListener(this); passwordField.addActionListener(this); From 8a52903a97017cd9fbe8501ce6a897373fc1ed07 Mon Sep 17 00:00:00 2001 From: Adah Boukhari Date: Sun, 9 Feb 2020 16:53:54 +0100 Subject: [PATCH 11/11] Commit_51 Namen und MatNr --- Hinweis El Boukhari.txt | 5 ----- Namen und MatrNr.txt | 4 ++++ 2 files changed, 4 insertions(+), 5 deletions(-) delete mode 100644 Hinweis El Boukhari.txt create mode 100644 Namen und MatrNr.txt diff --git a/Hinweis El Boukhari.txt b/Hinweis El Boukhari.txt deleted file mode 100644 index ca25228..0000000 --- a/Hinweis El Boukhari.txt +++ /dev/null @@ -1,5 +0,0 @@ -Ich möchte hier darauf hinweisen, dass ich meistens von meinem git Bash(User: Adah Boukhari) pushen werde. - -Name: Mohamed El Boukhari -Matrikel-Nr: 344691 -fdlt3054 diff --git a/Namen und MatrNr.txt b/Namen und MatrNr.txt new file mode 100644 index 0000000..2750302 --- /dev/null +++ b/Namen und MatrNr.txt @@ -0,0 +1,4 @@ + +Name: Mohamed El Boukhari(User_MyGitBash:Adah Boukhari) +Matrikel-Nr: 344691 +fdlt3054