资 源 简 介
neoevents is a dead-simple annotation-based swing-compliant java-event framework.
```
@actionPerformed
private void onClick() {
frame.setTitle("Hello World "+ new Date());
}
protected void initComponents() {
JButton button = new JButton("Click me!!!");
button.addActionListener(new ActionListener(this));
frame.getContentPane().add(button);
}
```
note that :
new ActionListener(this)
stands for new net.ericaro.neoevents.java.awt.event.ActionListener(this). It is a simple POJO class that forwards every "actionPerformed" call to every method of this annotated with @actionPerformed.
Every Listener in the whole java, and javax packages are mapped to net.ericaro.neoevents.xxx
Before neoevents you would have done something like :
```
java.awt.event.ActionListener listener = new java.awt.event.ActionList