I can guarantee that after you figure this out, it will be simple for you also. I took a quick glance at your code, and there are not any huge errors there (except for swallowing your exception, but that isn't an error as much as not following conventions)..
What specifically do you need help with? Judging by your comments, and what I see in your code, you already know how to do what you want to do.
