|
|
@ -32,6 +32,7 @@ public class MeinGui extends JFrame implements ActionListener { |
|
|
|
JLabel leeren; |
|
|
|
JButton loeschen; |
|
|
|
JButton exit; |
|
|
|
private JLabel budgetDispaly; |
|
|
|
/** |
|
|
|
* Launch the application. |
|
|
|
*/ |
|
|
@ -148,6 +149,10 @@ public class MeinGui extends JFrame implements ActionListener { |
|
|
|
beendne.setBounds(508, 246, 81, 14); |
|
|
|
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.text2.addActionListener(this); |
|
|
|
this.senden.addActionListener(this); |
|
|
@ -155,10 +160,6 @@ public class MeinGui extends JFrame implements ActionListener { |
|
|
|
this.loeschen.addActionListener(this); |
|
|
|
this.exit.addActionListener(this); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
@ -167,6 +168,11 @@ public class MeinGui extends JFrame implements ActionListener { |
|
|
|
if (ae.getSource() == this.exit) { |
|
|
|
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() + " €"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |