import java.awt.*; import java.awt.event.*; public class Fenster extends Frame implements ActionListener { Button b1, b2; Label l; public Fenster() { super("Mein Fenster"); b1 =new Button ("Die Eins-Bi Ba Bo"); b2 =new Button ("Die Zwei"); b1.addActionListener(this); b2.addActionListener(this); setLayout (new BorderLayout()); add(b1, BorderLayout.SOUTH); add(b2, BorderLayout.CENTER); pack(); } public void actionPerformed(ActionEvent e) { if (e.getSource() == b1) { System.out.println("Die Action is los am Knopf 1!"); setCursor(new Cursor(Cursor.HAND_CURSOR)); } else { System.out.println("Die Action is los am Knopf 2!"); setCursor(new Cursor(Cursor.WAIT_CURSOR)); } } public static void main(String[] args) { Fenster w = new Fenster(); w.setVisible(true); } }