|
@ -254,8 +254,8 @@ public class MeinGui extends JFrame implements ActionListener { |
|
|
tab.addRow(new Object[] { (textExpensesName.getText()), Double.parseDouble(text2.getText()) }); |
|
|
tab.addRow(new Object[] { (textExpensesName.getText()), Double.parseDouble(text2.getText()) }); |
|
|
|
|
|
|
|
|
balance -= Double.parseDouble(text2.getText()); |
|
|
balance -= Double.parseDouble(text2.getText()); |
|
|
expenses += Double.parseDouble(text2.getText()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
expenses += Double.parseDouble(text2.getText()); |
|
|
|
|
|
expensesDisplay.setText(setExpensesView()); |
|
|
balanceDisplay.setText(setBalanceView()); |
|
|
balanceDisplay.setText(setBalanceView()); |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
@ -280,10 +280,15 @@ public class MeinGui extends JFrame implements ActionListener { |
|
|
String result = budget + " €"; |
|
|
String result = budget + " €"; |
|
|
return result; |
|
|
return result; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static String setBalanceView() { |
|
|
public static String setBalanceView() { |
|
|
String result = budget - expenses + " €"; |
|
|
String result = budget - expenses + " €"; |
|
|
return result; |
|
|
return result; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public static String setExpensesView() { |
|
|
|
|
|
String result = "-" + expenses + " €"; |
|
|
|
|
|
return result; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |