From 006d6ff0a6da416a164cd58745f3401e0a9536fa Mon Sep 17 00:00:00 2001 From: eduardD Date: Fri, 7 Feb 2020 12:44:17 +0100 Subject: [PATCH] =?UTF-8?q?Funktionalit=C3=A4t=20hinzugef=C3=BCgt:=20erspa?= =?UTF-8?q?rtes=20errechnen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bin/MeinBudgetView/MeinGui$1.class | Bin 1110 -> 1110 bytes .../bin/MeinBudgetView/MeinGui.class | Bin 7789 -> 8099 bytes .../src/MeinBudgetView/MeinGui.java | 22 ++++++++++++++++++ 3 files changed, 22 insertions(+) diff --git a/Budget Projekt/bin/MeinBudgetView/MeinGui$1.class b/Budget Projekt/bin/MeinBudgetView/MeinGui$1.class index ef38babd078f2cdff0d023637437397ed6a34a7e..39d2ec9973f33824fb34ad078d14ac231c935338 100644 GIT binary patch delta 37 tcmcb{agAd`GBfXQ25yEw46=+&3@Qx2Cl@dWG5()?nAwAobutf&7XaXW3k?7O delta 37 tcmcb{agAd`GBfWl25yGm46=-j3@Qx2CKoUVG5(u;nAwAoWik(o7XaW93kLuI diff --git a/Budget Projekt/bin/MeinBudgetView/MeinGui.class b/Budget Projekt/bin/MeinBudgetView/MeinGui.class index 353a2a4a5d13ef67b72ef6a62b0e031d7fbb1627..0416570d78cc8a14c1a32f7790bebce18a7982a4 100644 GIT binary patch literal 8099 zcmbVR3w)H-mH(f4XYwV?BnSji17Zsi2&hE_eDDY_13>~vM1@K65k@C7ac06p6vg+W zzTfq=Yg@FnwKl*c$|}~jxQoiRxK&G$b}8M~RjaPGT3u`Z=YHQzW`K5ozs>K*+$A@TI7uD~!Xp?o-;O7zcei)g*`;xNZM`mMcgKV9392rNt%1nO2<0wAOeD86kZ=&o2|Fk*vV}Dw6<(Km28Y>vUbu=3(DJ4Nlvp1V@X>uu(5=U z0uxgN{;a(&J3%m{bbB$Ov*LE5J&$sdAd-l++6jlrxt+0&!-+O30#8&K%!YMcb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q0pH0O^qqmHea(2rw-~#8EAg!F zO6>Msjpux~;052kc+vMDe&~A=dwjd`lJ6C~?0XZh_&&goeIMheelLFJufjh6NqE)Y zfYO@BKM_|y1>e-jS+Z^AGAcj7JoSMj$0VZ7ttf#3Ld{NLjis~35>!Y0=4*4pdNn?OvT56v+jgd#T`J*y{ zGq3FS9g>Nh`Q&ZiUYW$1-{bc^Dw8=2cozFsO9N?xo(FtYGKI5{=Y8*sGL^G3?{x2a zIgPWhceQu1oKA{z-^rfaie5n!7M{9r;(rqk8;ZAV~G z&U06L&8ktm8EG1nc{^m0yVJcLM-#jURScIsu$Vgs<)WOly8ElPW1ZQz&HgGAVauPB zOBYV`@4^jjUQIXB#5m->!+cOKYt6~(e(5ZLx^{3OYYOX*9lF>*C~J8VbL^n3<3uCT ztC5Iv8GDdXD3{Twlp65!2#%Gpe9#_;^W=E`H)9-D$%%*)`!+d+A8Aj;BT~nYmgBKg zCYjr+b?o8XmRd%VlA^WZSRy@g6>lp|Xb8T_iV2@0jWT^OJJw`7%kTdD@p}g)Q%Dd@ z3Lc6zg_kC-L3olxuB8;=Is-H(y!7$-AOFEjZs(^>pC(>a*SZv^VCMmT+F zyTV<-yrx>!?3B%I{jz9Kt{IRm)pC7KZpg_k3+lh8M8^D%p0hDp8VxIpgrm84J5v)i z)@Q2AbOGH?nT~at@{+s$U&eEB3?FAIqcT3Gh%w*BF5?T$qX{@x8CT046qUSla@YSM e@B-SSrNEcZEmvTVe9@@(CApWQKDC`k7ycKFIVA-E diff --git a/Budget Projekt/src/MeinBudgetView/MeinGui.java b/Budget Projekt/src/MeinBudgetView/MeinGui.java index 88a8905..9b78815 100644 --- a/Budget Projekt/src/MeinBudgetView/MeinGui.java +++ b/Budget Projekt/src/MeinBudgetView/MeinGui.java @@ -53,6 +53,7 @@ public class MeinGui extends JFrame implements ActionListener { public static double budget; public static double expenses; public static double balance; + public static double erspartes; public static JTextField textExpensesName; public static JLabel ausgabenName; private static JLabel ausgabenBetrag; @@ -269,6 +270,7 @@ public class MeinGui extends JFrame implements ActionListener { berechne.addActionListener(this); loeschen.addActionListener(this); exit.addActionListener(this); + hinzufuegen.addActionListener(this); } @@ -297,7 +299,27 @@ public class MeinGui extends JFrame implements ActionListener { balanceDisplay.setText(setBalanceView()); } + + if (ae.getSource() == this.hinzufuegen) { + erspartesHinzufuegen(); + } + + } + private void erspartesHinzufuegen() { + erspartes += (budget - expenses); + budget = 0.0; + expenses = 0.0; + balance = 0.0; + text1.setText(null); + text2.setText(null); + budgetDispaly.setText("0.0 \u20AC"); + expensesDisplay.setText("0.0 \u20AC"); + balanceDisplay.setText("0.0 \u20AC"); + savingsDisplay.setText(Double.toString(erspartes)); + textExpensesName.setText(null); + ((DefaultTableModel) myTable.getModel()).setRowCount(0); + } public static void exitButton() {