Why did you repost the question here?
You where given the solution in your other posting on this topic:
http://forum.java.sun.com/thread.jspa?threadID=743971
The 3rd reply showed you how to write code in an ActionListener that has been added to a button.
And the 1st replay showed you the one line of code to add to the ActionListener.
Put the two together and you have your answer.