You may want to check it in a Java tutorial.
In short: wherever you are expecting an exception and want to response it, you surround the given piece of code with a try block, and catch the exception at the end.
Handling an exception efficiently implies that you know what kind of exception may occur and where. In the code fragment you have posted there do not seem to be places for getting exceptions what could be responded.
Here is a theoretical example:
This piece of code tries to handle the current contents of a TextField (tf) as an integer number. If it is really a number, it multiplies it by 2. If it is not a number, Integer.parseInt will throw a NumberFormatException, which is caught at the end. In this case some instruction will be written into the TextField.
// tf is a TextField, defined somewhere else
tf.setString("You should have written a number here");