salve, con la jdk 1.5 non riesco a settare il focus ad una componente JTextField. Con leversioni precedenti della JDK se non sbaglio utilizzavo il metodo setFocus() o qualcosa di simile. ora invece ci sono questi metodi:
e quello che mi sembra il più opportuno mi sembra il primo "setFocusable(boolean)", però non funziona.- setFocusable(boolean focusable): Sets the focusable state of this Component to the specified value.
- setFocusTraversalKeys(int id, Set<? extends AWTKeyStroke> keystrokes): Sets the focus traversal keys for a given traversal operation for this Component.
- setFocusTraversalKeysEnabled(boolean focusTraversalKeysEnabled): Sets whether focus traversal keys are enabled for this Component.
- getFocusCycleRootAncestor(): Returns the Container which is the focus cycle root of this Component's focus traversal cycle.
- getFocusListeners(): Returns an array of all the focus listeners registered on this component.
- getFocusTraversalKeys(int id): Returns the Set of focus traversal keys for a given traversal operation for this Component.
- getFocusTraversalKeysEnabled(): Returns whether focus traversal keys are enabled for this Component.
Cosa mi suggerite?