Not sure what you mean by "links".
You add an action listener to a button. When the user presses the button, the code in the action listener method is called where you do what you want to do to...