|
|
@ -284,6 +284,11 @@ public class TasksFrame extends JFrame { |
|
|
|
s19.setBounds(180,60,50,30); |
|
|
|
s19.setText("19%"); |
|
|
|
|
|
|
|
JButton s07 = new JButton(); |
|
|
|
s07.setVisible(true); |
|
|
|
s07.setBounds(240,60,50,30); |
|
|
|
s07.setText("7%"); |
|
|
|
|
|
|
|
JLabel ausgabe = new JLabel(); |
|
|
|
ausgabe.setVisible(true); |
|
|
|
ausgabe.setBounds(10,90,300,30); |
|
|
@ -299,9 +304,21 @@ public class TasksFrame extends JFrame { |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
s07.addActionListener(new ActionListener() { |
|
|
|
@Override |
|
|
|
public void actionPerformed(ActionEvent e) { |
|
|
|
String textPreis = preis.getText(); |
|
|
|
double val_preis = Double.valueOf(textPreis); |
|
|
|
double res = steuer7(val_preis); |
|
|
|
ausgabe.setText("Die Steuer beträgt:" +res +"€"); |
|
|
|
|
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
jPanel.add(ausgabe); |
|
|
|
jPanel.add(euro); |
|
|
|
jPanel.add(s19); |
|
|
|
jPanel.add(s07); |
|
|
|
jPanel.add(frage); |
|
|
|
jPanel.add(preis); |
|
|
|
jPanel.add(info); |
|
|
|