You will learn a lot more if you sit down and study the code, research what you don't understand. Asking someone else to explain this code is a vague request - what don't you understand about it? If you have a specific question, ask it.
This thread has been cross posted here:
Although cross posting is allowed,
for everyone's benefit, please read:
Java Programming Forums Cross Posting Rules
The Problems With Cross Posting