JButton(Action a) code example
Example: jbutton set on action
jBtnSelection.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
//code here
}
} );
jBtnSelection.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
//code here
}
} );