Perhaps it is just because it is late, but I didn't follow most of that question.
Is this a java application called Swing? I don't know anything about it.
The Linux system that you are running this on, is it yours or a school/friend's?
What are mnemonic keys and what are they supposed to do?
If a java program isn't working, we will likely need the version of java you are running it on in order to be of any help.