Tab focus traversal in JMEDesktop etc

  1. How to get focus traversal with the tab key to work?


  2. Text input(textfields etc) doesn't type letter on key down but only on key realeased/typed, which is not standard, how to fix?
  1. You can set up a listener (to the tab key) that calls desktop.setFocusedComponent(nextComonent) (iirc) , not sure how you find the next component, though
  2. Hmm, on key typed is correct, I think. But the typed events are sent upon release and not upon press. Additionally the 'typed' events are not repeated. The event creation is done in JMEDesktop and should be improved…
  1. yeah i guess i can live with that for now, even if it's a hack :slight_smile:


  2. the code seems to be correct, but the behaviour is not the same as in a regular swing component, where the letter gets printed directly on key down…
  1. Just looked into JMEDesktop: the TYPED events were fired on release. I changed that. Now the letters appear when the keys are pressed.

just like i did locally to hack it around…behaviour seems correct…but dunno why it behaved like that from start…doesnt keytyped equal the release of a pressed key? anyways, if noone complains about it, i like this version more :wink:

No, swing in deed fires the 'typed' event right after the 'pressed'. So it should be fine.

phuuu…good to hear! :slight_smile: