Change in TAB key functionality with Java 1.7?
I am a relatively beginning Java programmer. I have a few years experience trying to maintain and upgrade a large Java GUI app that interacts with a backend database.
There are many screens in the app, with Textfields inside of Frames, and these components have been inherited by classes in this app to customize the fields/frames.
Traversal amongst the fields was functioning properly until 1.7 came along. Before I made any changes trying to correct it, the TAB key had become unresponsive. It did nothing, or so it would appear. After further inspection, I found that it was actually gaining focus on the 'next' field, and then immediately losing focus, and regaining focus on the original field.
I made one change to a section of code that had been put in place to handle changes encountered with the release of 1.4. It was inspecting the java vendor/version and deciding on executing a code block. It was looking for a vendor string of 'Sun', so now with 1.7, it was not getting a true condition anymore. I changed that so it is now executing the code it was previously for versions 1.4-6.
Anyway, the code it is executing calls setFocusTraversalKeysEnabled(false) on each component. Now, with this enabled for 1.7, the TAB key does in fact go (or tries to go) to the next field, but before it does that, it inserts the TAB character. This usually results in the field failing its format check.
Can anyone lend some insight into why this is happening, or point me to some documentation that might explain it?