|
|
@ -24,8 +24,8 @@ import javax.swing.JSeparator; |
|
|
|
public class MeinGui extends JFrame implements ActionListener { |
|
|
|
|
|
|
|
private JPanel contentPane; |
|
|
|
private static JTextField text1; |
|
|
|
private static JTextField text2; |
|
|
|
public static JTextField text1; |
|
|
|
public static JTextField text2; |
|
|
|
JLabel labelBudgetImage; |
|
|
|
JLabel labelExpensesImage; |
|
|
|
JLabel labelBalancetImage; |
|
|
@ -35,12 +35,12 @@ public class MeinGui extends JFrame implements ActionListener { |
|
|
|
JLabel leeren; |
|
|
|
JButton loeschen; |
|
|
|
JButton exit; |
|
|
|
private static JLabel budgetDispaly; |
|
|
|
private static JLabel expensesDisplay; |
|
|
|
private static JLabel balanceDisplay; |
|
|
|
private static int budget; |
|
|
|
private static int expenses; |
|
|
|
private static int balance; |
|
|
|
public static JLabel budgetDispaly; |
|
|
|
public static JLabel expensesDisplay; |
|
|
|
public static JLabel balanceDisplay; |
|
|
|
public static int budget; |
|
|
|
public static int expenses; |
|
|
|
public static int balance; |
|
|
|
|
|
|
|
/** |
|
|
|
* Launch the application. |
|
|
@ -194,7 +194,7 @@ public class MeinGui extends JFrame implements ActionListener { |
|
|
|
|
|
|
|
budget = Integer.parseInt(text1.getText()); |
|
|
|
if (ae.getSource() == this.senden && (text1 != null && text2 != null)) { |
|
|
|
SetBudgetView(); |
|
|
|
budgetDispaly.setText(setBudgetView()); |
|
|
|
} |
|
|
|
|
|
|
|
if (ae.getSource() == this.berechne && (text1 != null && text2 != null)) { |
|
|
@ -218,8 +218,10 @@ public class MeinGui extends JFrame implements ActionListener { |
|
|
|
balanceDisplay.setText(""); |
|
|
|
} |
|
|
|
|
|
|
|
public static void SetBudgetView() { |
|
|
|
budgetDispaly.setText(budget + " €"); |
|
|
|
|
|
|
|
public static String setBudgetView() { |
|
|
|
String result = budget + " €"; |
|
|
|
return result; |
|
|
|
} |
|
|
|
|
|
|
|
public static void setExpensesView() { |
|
|
|