|
@ -69,6 +69,8 @@ public class TasksFrame extends JFrame { |
|
|
|
|
|
|
|
|
setupDate(); |
|
|
setupDate(); |
|
|
|
|
|
|
|
|
|
|
|
setupSteuer(); |
|
|
|
|
|
|
|
|
setupTemperatur(); |
|
|
setupTemperatur(); |
|
|
|
|
|
|
|
|
setupSum(); |
|
|
setupSum(); |
|
@ -254,6 +256,57 @@ public class TasksFrame extends JFrame { |
|
|
return steuer; |
|
|
return steuer; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void setupSteuer() |
|
|
|
|
|
{ |
|
|
|
|
|
JPanel jPanel = setupPanel("Steuer Berechner von Kaufprodukten"); |
|
|
|
|
|
|
|
|
|
|
|
JLabel info = new JLabel(); |
|
|
|
|
|
info.setVisible(true); |
|
|
|
|
|
info.setBounds(10,30,170,30); |
|
|
|
|
|
info.setText("Bitte geben Sie den Preis:"); |
|
|
|
|
|
|
|
|
|
|
|
JTextField preis = new JTextField(); |
|
|
|
|
|
preis.setVisible(true); |
|
|
|
|
|
preis.setBounds(190,30,60,30); |
|
|
|
|
|
|
|
|
|
|
|
JLabel euro = new JLabel(); |
|
|
|
|
|
euro.setVisible(true); |
|
|
|
|
|
euro.setBounds(251,30,30,30); |
|
|
|
|
|
euro.setText("€"); |
|
|
|
|
|
|
|
|
|
|
|
JLabel frage = new JLabel(); |
|
|
|
|
|
frage.setVisible(true); |
|
|
|
|
|
frage.setBounds(10,60,170,30); |
|
|
|
|
|
frage.setText("Wie hoch war die Steuer:"); |
|
|
|
|
|
|
|
|
|
|
|
JButton s19 = new JButton(); |
|
|
|
|
|
s19.setVisible(true); |
|
|
|
|
|
s19.setBounds(180,60,50,30); |
|
|
|
|
|
s19.setText("19%"); |
|
|
|
|
|
|
|
|
|
|
|
JLabel ausgabe = new JLabel(); |
|
|
|
|
|
ausgabe.setVisible(true); |
|
|
|
|
|
ausgabe.setBounds(10,90,300,30); |
|
|
|
|
|
|
|
|
|
|
|
s19.addActionListener(new ActionListener() { |
|
|
|
|
|
@Override |
|
|
|
|
|
public void actionPerformed(ActionEvent e) { |
|
|
|
|
|
String textPreis = preis.getText(); |
|
|
|
|
|
double val_preis = Double.valueOf(textPreis); |
|
|
|
|
|
double res = steuer19(val_preis); |
|
|
|
|
|
ausgabe.setText("Die Steuer beträgt:" +res +"€"); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
jPanel.add(ausgabe); |
|
|
|
|
|
jPanel.add(euro); |
|
|
|
|
|
jPanel.add(s19); |
|
|
|
|
|
jPanel.add(frage); |
|
|
|
|
|
jPanel.add(preis); |
|
|
|
|
|
jPanel.add(info); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
private void setupUmrechnen() { |
|
|
private void setupUmrechnen() { |
|
|
|
|
|
|
|
|
JPanel jPanel = setupPanel("Dezimal nach Binär"); |
|
|
JPanel jPanel = setupPanel("Dezimal nach Binär"); |
|
|