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