It's time to take a look at JavaFX buttons and events. JavaFX makes it really easy to handle events (such as clicking on a button) and change components in response to the event. If you know Swing, you'll really appreciate the ease of use of JavaFX. You have to do a lot less work yourself in JavaFX!
Source Code - JavaFX 4