Please keep in mind that the primary goal of JavaRanch is to help beginners (green horns) learn how to do things themselves. Sometimes the best way to do this is to give that person a working example that they can study. There is plenty of sample code to be found on JavaRanch. We even have a guide to finding it; Java Sample Code.
We are not, however, a code mill and make a point not to give out working code to someone who wants to turn it in as a homework assignment or dump it into their project without knowing what it does.
We would much rather see you post your own code, working or not, and give you tips to help you get it working or point you toward resources that will help you to learn how to solve your problem using best practices.
If you were directed to this page, maybe someone thought you were trying to get someone to do your work for you. This would be a good time to go back to your original topic and show them what you've already done or describe, in detail, what exactly it is that you're having trouble understanding.
If you do this, you'll probably find, that people will be much more willing to help you.