Welcome to the Ranch
Why are you calling that dynamic? I would have thought “label” is a less-than-brilliant name for a button, however.
You need to add Listeners. You can add Listeners to just about everything in Swing. If you find the 3rd edition of Thinking in Java™ by Bruce Eckel, you can download it free of charge, and there is (I think) a little program in it which uses reflection to give you a list of how many different listeners you can add to a particular Component.
I have found some of my old posts about listeners:
1 2 3 Some of them will have links to old posts, and if you follow them far enough, you can get back to where you started!
Have a look at them, and see whether they help.

It is easier to post links to old posts than to write them out again. If those links don’t help, tell us more details.