A few things before we can help you, remember these on all your other posts:
1. Put your code in Java Tags. To do this, put
[highlight=java] before your code and
[/highlight] after your code. This makes it easier for everyone to read your code.
2. Explain to us what exactly your code is doing that is wrong. Give full details of errors and provide us with as much information about the situation as possible.
3. Give us an example of what the output
should look like when done correctly. This gives everyone an understanding of what the final product
should be, compared to what you have now.
Make those changes to your post, and do those on all your future posts, and you will receive help MUCH faster. Until those are done, I really can't help you much, as I don't have a full understanding to what is going on.