It is generally bad form to swallow an exception. What I mean by swallowing it is that in your try/catch loop, you should at a minumum have a stack dump. That way if there is an error, you will have some clue. Otherwise your application will continue on as though nothing happened, except that you may get bad results. At a minimum, you should have:
EDIT: errm, you should do this:
} catch(Exception e)
{
e.printStackTrace();
}
Your code works though, so you can leave it alone....