I think folks would be better able to help you if you were to post the relevant code you're working on.
When posting code, please be sure to surround the code with the [code] and [/code]
UBB Tags. This will help to preserve the formatting of the code, thus making it easier to read and understand.
Now, since your solution will like make use of Swing and/or AWT components, I'm moving this to the Swing / AWT / SWT / JFace forum...