Skip to content

Instantly share code, notes, and snippets.

@ankurpshah
Created July 27, 2013 08:38
Show Gist options
  • Save ankurpshah/6094263 to your computer and use it in GitHub Desktop.
Save ankurpshah/6094263 to your computer and use it in GitHub Desktop.
Objecte Oriented Actionlistener
package functions;
import java.awt.*;
import java.awt.event.*;
class HelloButtonApp2 {
private final Button button = new Button();
}
public HelloButtonApp2() {
button.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
System.out.println("Hello There: event received: " + e);
}
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment