|
|
@ -1021,8 +1021,23 @@ public class TasksFrame extends JFrame { |
|
|
|
jButton.setText("Berechne"); |
|
|
|
jButton.setVisible(true); |
|
|
|
|
|
|
|
JLabel ausgabe = new JLabel(); |
|
|
|
ausgabe.setBounds(80,20,30,20); |
|
|
|
ausgabe.setVisible(false); |
|
|
|
jButton.addActionListener(new ActionListener() { |
|
|
|
@Override |
|
|
|
public void actionPerformed(ActionEvent e) { |
|
|
|
String texta = f1.getText(); |
|
|
|
String textb = f2.getText(); |
|
|
|
Integer val_a = Integer.valueOf(texta); |
|
|
|
Integer val_b = Integer.valueOf(textb); |
|
|
|
Integer res = bin1(val_a, val_b); |
|
|
|
ausgabe.setText(String.valueOf(res)); |
|
|
|
ausgabe.setVisible(true); |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
jPanel.add(ausgabe); |
|
|
|
jPanel.add(jButton); |
|
|
|
jPanel.add(f1); |
|
|
|
jPanel.add(f2); |
|
|
|