Hi kevinGreen!
u can easily achieve that if you are a netbeans user. There is a tab under GUI design that is called Connection of events.