A JPasswordField doesn't always recognize AltGraph Keystrokes in Java SE 6. A reproducible testcase is available (it is attached to this CR).
In order to enter special characters, you sometimes need the AltGraph key. Actually that need depends on the keyboard layout you use in your country. In order to enter the at-character ('@') on a german keyboard for example, you need to hit both the AltGraph-Key and the q-Key while on an US keyboard it is enough to use both the shift-key and the 2-key. So in order to reproduce the problem, go and find a localized keyboard first :-D
Testcase:
Run the attached GUI by entering
java -jar PasswdTest.jar
As the testcase has been created with Netbeans 6, you need the libs in the lib folder which has also been provided.
At the GUI you see an editable password text field, a button to transfer the content of the password text field to the two other non-editable text fields below and the Java Version which you are currently using. If you release a key at the password text field, the other two non-editable textfields will be filled with the current content of the password text field. You can force the action also by the button called "Get text".
In the password text field called "Password:" enter "genius@work" for example. Note that you need to enter it manually, character by character and you need to enter it on a keyboard where you need to use the AlgGraph key in order to enter the @-character. If you are on an US keyboard you won't be able to reproduce the problem, because on an US-keyboard you don't need the AltGraph key in order to enter the @-character.
Once you have entered the '@' character you will notice that the 'q' appears rather than the '@' character. You get "geniusqwork" rather than "genius@work".
Note that there is no problem if you copy/paste characters from other applications to the JPasswordField rather than entering them manually with the keyboard.