|
@ -197,7 +197,7 @@ public class MeinGui extends JFrame implements ActionListener { |
|
|
|
|
|
|
|
|
if (ae.getSource() == this.berechne && (text1 != null && text2 != null)) { |
|
|
if (ae.getSource() == this.berechne && (text1 != null && text2 != null)) { |
|
|
expenses = budget - Integer.parseInt(text2.getText()); |
|
|
expenses = budget - Integer.parseInt(text2.getText()); |
|
|
//expensesView(); |
|
|
|
|
|
|
|
|
expensesView(); |
|
|
balance = Integer.parseInt(text1.getText()) - Integer.parseInt(text2.getText()); |
|
|
balance = Integer.parseInt(text1.getText()) - Integer.parseInt(text2.getText()); |
|
|
//balanceView(); |
|
|
//balanceView(); |
|
|
} |
|
|
} |
|
@ -222,10 +222,11 @@ public class MeinGui extends JFrame implements ActionListener { |
|
|
budgetDispaly.setText(budget + " €"); |
|
|
budgetDispaly.setText(budget + " €"); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
|
|
|
|
public static void expensesView() { |
|
|
public static void expensesView() { |
|
|
expensesDisplay.setText(expenses - budget + " €"); |
|
|
expensesDisplay.setText(expenses - budget + " €"); |
|
|
} |
|
|
} |
|
|
|
|
|
/** |
|
|
|
|
|
|
|
|
public static void balanceView() { |
|
|
public static void balanceView() { |
|
|
balanceDisplay.setText(balance + " €"); |
|
|
balanceDisplay.setText(balance + " €"); |
|
|