There are no restrictions in java on what file extension you use when you create a file.


You would use an action listener added to the button. When the button is clicked, the listener is called...