From a437335374d4fbab431439f6f726692fe4830855 Mon Sep 17 00:00:00 2001 From: Adah Boukhari Date: Thu, 6 Feb 2020 13:06:11 +0100 Subject: [PATCH] Commit_34 Neue Klasse LoginFrame angelegt --- .../bin/MeinBudgetView/LoginFrame$1.class | Bin 0 -> 753 bytes .../bin/MeinBudgetView/LoginFrame.class | Bin 0 -> 1972 bytes .../bin/MeinBudgetView/MeinGui.class | Bin 7438 -> 7414 bytes .../src/MeinBudgetView/LoginFrame.java | 72 ++++++++++++++++++ .../src/MeinBudgetView/MeinGui.java | 6 +- 5 files changed, 75 insertions(+), 3 deletions(-) create mode 100644 Budget Projekt/bin/MeinBudgetView/LoginFrame$1.class create mode 100644 Budget Projekt/bin/MeinBudgetView/LoginFrame.class create mode 100644 Budget Projekt/src/MeinBudgetView/LoginFrame.java diff --git a/Budget Projekt/bin/MeinBudgetView/LoginFrame$1.class b/Budget Projekt/bin/MeinBudgetView/LoginFrame$1.class new file mode 100644 index 0000000000000000000000000000000000000000..42c1af606db9450161834d50f64d88c2287ef557 GIT binary patch literal 753 zcmaJwkjk6btcYbWxf>`tT^cV7-qRG7Lb2vnEe*K=d!aH0eXPqfkLQ-PIsXCUD0M6a~tGHtNNEI#lt|BBB~Zp_~k4tgU_Fbkbv;2sDHLNZVtQcy3%&1sa#)JXEl1 ze>ER>XTV|p&xla3SXW*fM4Hq{B)|Vw6d=Awt)sgXWD-%A8wMqM_3_l#jGGwXw z_qIiB-{m4HQ4moJ{=v(;QbyO4vx};|el(9mb*OD8%gZr5wBhs|m~av$+KhWDJ&r~` z?%_UrJeArA)Z6d=O4Cm%cf4n3;6FD;#rqSPBq~7*Y#Ude4{Gfbtt{@*c$m$cAhftVCa8iVFRNI+7VIFi7tkg3BxknDTc;qY)!#g^n`GZp-UE( z;QMZ3c8^NE=Lt`!=tUouZ&-Wwj!1J?I1D|}x=ikSmc?_X2y*F28~xHEd$DDLOApXV6s)Vu+eS*re@QdCDskou^-H zErj9IatKfa@V#V`x8OFlC#zqmtxqFf^~y=C`p-BF^4-;4<(hV7k;htm8>k6lqsCxP#p6r7VvT9t~7sU zdoC%mu8N9nkz2eFoC#sEs<~P!3rWv)ZR&R#%d&(4xzlAG_f@PSLxSab;zqBFnzD<# zwncIskJZy#GloDDa=xCjg_ZgtRq&wF%B+eI!tzrO;Zqv76K9U*QNcz9|42nE6!}RB zZXl;(OG-`&7&E=1RSH4M|3sKH&j~Y(0<}9SEYJN?I2JuSV+!(EmVbH}I~1gr;@D+U zs{6zsP4=hXINYS3Ft5%EjYUAiDM|^_X6DQ#u^*)HpBF5!N)^_D9*t5atG4HCi8(_K zT*vW4IV{U!Q0Fb`f663AMG03(IgRwrHljg}1??Inr@=~GRo6DCggZlDx5&?EZ7ZWa zdkF0pbiW8d=jmS|C(uXh0QzYs4-pg>@D{B^EV?RTSeY(qB2$Nch>LpXB_CJx79a2G zT3*XX*l!Uwh{&>f@%|l`)YG)9(;dK5pyMM)0kc z*4nH7xbz=WxeZBZj7ZXn&Ovlwh)9ehieX$u0y7w)IU7ZW-my(wgNf_#a06fACZ1E5 zzQ;Izq-W(NChDQQL&6s2DxD&KWue5{W6zSegynqFpn)QmF e!(DtqjeU(CIJA>WDG{atF5M`bPHzsa^!pe5CgxE9 literal 0 HcmV?d00001 diff --git a/Budget Projekt/bin/MeinBudgetView/MeinGui.class b/Budget Projekt/bin/MeinBudgetView/MeinGui.class index 4cf9f3ba7d14e6a37b80ddcfd93491472557cb7e..547b9c7414ee7619ccad3a2cbb0e0a4f325e5ab5 100644 GIT binary patch delta 983 zcmZ8fTT4_?7+q^-bo8`mCbXiQNdm1j4J)m@q-ojR%G54))5)gEyiAvwEVJxp&`S{K zsXrhDMR=^!kQG586!a7kz4jOdNnu78`i|#R(0Sn1^oV(O9b$#79;xI0=@8%rGMj3`!drM}m^AUL?(A=D_DF$!dy-okO*R+u6E_=$G>!c_wM zZjiW17Yw>FLN7`LKF3ysSqzFN+OU;jP(Telz&5yeP@-w@_ zb*@_n&m`rn5q32jtWGj^pT{$K!eqkaX+0y9yR?sItw&e`=b$#pw_6XL?Vv>C=>N!$ zP;SW|q)e@Y+$iE$$dHB1g B<3|7h delta 1012 zcmZ8fOH5Q}6#l-Mk%7xUGaykZcWg{RA`gQGih`C3qWD6P@kLveQLa;PdIyFXq1Kkx zR-1I;=B{+*iWoI9&X~)@S6rFcq$^{LD~(G{lbSZxJ~W=oy=v0UfBy6M&Uaof+D^A? zzr4P73qUJ>x}v>MI$P05Xi39JcV#n~l&N8ys}4^7@4l@aKgy!9x*009A}T>CPIG2wEO2NZ{-i*w;@QGz2ueqrg6=*Aw6y-X^8iB6(aU<0Yi z^{K3x2{J`2df#R&lO8b>UD=W3u#wgn;J8y)npm)`yUu#+5?E@?D5 zsW`>2tn-mI#U{U2JTCmtA`Ox62rhR5PB;NSFRE}8B`5&W`>n+-M_>aXJ083gNX zuJqKqGbk#sC5Md7RRylev(xjWW>6{SJD8utu{%&X+$(Us&5fQvK7%83eq+vmAcx;< zZobXl-o|-1adOa~!$X_Xt73xz32?I)*cY=I%W=;;Qz9=42jA(3@{V%9z|Vv#hX)1j zm(LaHz>j8mI}nlgca-9}{Qi)m_)`}47wYg5>+m-=<39}H6-MzIKNI_Lmc#}6kf$Fv z7(|P}m$)Ng6?M^MIE?ckD4+oz;xK$P#9E9%B-HRP(sB&VXcT{~Ser#s8D_^nh@;#{DI+A8aIs$1-#WVDI@BV*B;mbXZ`YY(|a lX5t{D4zhyNLMC9F-@m847_BLHfj<5yp+27EDeG}`;TuS7^?CpR diff --git a/Budget Projekt/src/MeinBudgetView/LoginFrame.java b/Budget Projekt/src/MeinBudgetView/LoginFrame.java new file mode 100644 index 0000000..8279170 --- /dev/null +++ b/Budget Projekt/src/MeinBudgetView/LoginFrame.java @@ -0,0 +1,72 @@ +package MeinBudgetView; + +import java.awt.BorderLayout; +import java.awt.EventQueue; + +import javax.swing.JFrame; +import javax.swing.JPanel; +import javax.swing.border.EmptyBorder; +import javax.swing.JButton; +import javax.swing.JPasswordField; +import javax.swing.JTextField; +import javax.swing.JLabel; +import java.awt.Color; + +public class LoginFrame extends JFrame { + + private JPanel contentPane; + private JPasswordField passwordField; + private JTextField textField; + + /** + * Launch the application. + */ + public static void main(String[] args) { + EventQueue.invokeLater(new Runnable() { + public void run() { + try { + LoginFrame frame = new LoginFrame(); + frame.setVisible(true); + + } catch (Exception e) { + e.printStackTrace(); + } + } + }); + } + + /** + * Create the frame. + */ + public LoginFrame() { + setTitle("Anmelden"); + setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + setBounds(100, 100, 450, 300); + contentPane = new JPanel(); + contentPane.setBackground(Color.WHITE); + contentPane.setBorder(new EmptyBorder(5, 5, 5, 5)); + setContentPane(contentPane); + contentPane.setLayout(null); + + JButton anmelden = new JButton("Anmelden"); + anmelden.setBounds(182, 168, 97, 23); + contentPane.add(anmelden); + + passwordField = new JPasswordField(); + passwordField.setBounds(147, 137, 132, 20); + contentPane.add(passwordField); + + textField = new JTextField(); + textField.setBounds(147, 106, 132, 20); + contentPane.add(textField); + textField.setColumns(10); + + JLabel lblNewLabel = new JLabel("Benutzername:"); + lblNewLabel.setBounds(48, 106, 89, 20); + contentPane.add(lblNewLabel); + + JLabel lblNewLabel_1 = new JLabel("Password: "); + lblNewLabel_1.setBounds(61, 140, 76, 14); + contentPane.add(lblNewLabel_1); + } +} diff --git a/Budget Projekt/src/MeinBudgetView/MeinGui.java b/Budget Projekt/src/MeinBudgetView/MeinGui.java index 0c4ee3d..0029328 100644 --- a/Budget Projekt/src/MeinBudgetView/MeinGui.java +++ b/Budget Projekt/src/MeinBudgetView/MeinGui.java @@ -241,7 +241,7 @@ public class MeinGui extends JFrame implements ActionListener { exitButton(); } if (ae.getSource() == this.loeschen) { - leerButton(); + leeren(); } budget = Double.parseDouble(text1.getText()); @@ -262,11 +262,11 @@ public class MeinGui extends JFrame implements ActionListener { } - public void exitButton() { + public static void exitButton() { System.exit(0); } - public static void leerButton() { + public static void leeren() { text1.setText(null); text2.setText(null); budgetDispaly.setText(null);