cara menambahkan beberapa pendengar aksi ayunan java
JButton addButton = new JButton( new AbstractAction("add") {
@Override
public void actionPerformed( ActionEvent e ) {
// add Action
}
});
JButton substractButton = new JButton( new AbstractAction("substract") {
@Override
public void actionPerformed( ActionEvent e ) {
// substract Action
}
});
snoop