add function to button java 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
}
} );