|
@ -32,6 +32,7 @@ public class MeinGui extends JFrame implements ActionListener { |
|
|
JLabel leeren; |
|
|
JLabel leeren; |
|
|
JButton loeschen; |
|
|
JButton loeschen; |
|
|
JButton exit; |
|
|
JButton exit; |
|
|
|
|
|
private JLabel budgetDispaly; |
|
|
/** |
|
|
/** |
|
|
* Launch the application. |
|
|
* Launch the application. |
|
|
*/ |
|
|
*/ |
|
@ -148,16 +149,16 @@ public class MeinGui extends JFrame implements ActionListener { |
|
|
beendne.setBounds(508, 246, 81, 14); |
|
|
beendne.setBounds(508, 246, 81, 14); |
|
|
contentPane.add(beendne); |
|
|
contentPane.add(beendne); |
|
|
|
|
|
|
|
|
|
|
|
this.budgetDispaly = new JLabel("0.0"); |
|
|
|
|
|
this.budgetDispaly.setBounds(352, 115, 46, 14); |
|
|
|
|
|
contentPane.add(this.budgetDispaly); |
|
|
|
|
|
|
|
|
this.text1.addActionListener(this); |
|
|
this.text1.addActionListener(this); |
|
|
this.text2.addActionListener(this); |
|
|
this.text2.addActionListener(this); |
|
|
this.senden.addActionListener(this); |
|
|
this.senden.addActionListener(this); |
|
|
this.berechne.addActionListener(this); |
|
|
this.berechne.addActionListener(this); |
|
|
this.loeschen.addActionListener(this); |
|
|
this.loeschen.addActionListener(this); |
|
|
this.exit.addActionListener(this); |
|
|
this.exit.addActionListener(this); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -167,6 +168,11 @@ public class MeinGui extends JFrame implements ActionListener { |
|
|
if (ae.getSource() == this.exit) { |
|
|
if (ae.getSource() == this.exit) { |
|
|
System.exit(0); |
|
|
System.exit(0); |
|
|
} |
|
|
} |
|
|
|
|
|
if (ae.getSource() == this.senden && (this.text1 != null && this.text2 != null)) { |
|
|
|
|
|
//this.text2.setText(this.text1.getText() + " "); |
|
|
|
|
|
this.budgetDispaly.setText(this.text1.getText() + " €"); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |