Aurelaine17
Messages postés11Date d'inscriptionlundi 25 octobre 2004StatutMembreDernière intervention24 septembre 2007
-
15 avril 2005 à 17:43
Twinuts
Messages postés5375Date d'inscriptiondimanche 4 mai 2003StatutModérateurDernière intervention14 juin 2023
-
17 avril 2005 à 14:21
Bonjour,
Un peu d'aide SVP, je voudraismettre le focus sur un jtextfield de mon choix mais je n'y arive pas !!!
Quelqu'un aurait-il un bout de code pour m'aider ?????
Merci d'avance
Twinuts
Messages postés5375Date d'inscriptiondimanche 4 mai 2003StatutModérateurDernière intervention14 juin 2023111 17 avril 2005 à 14:21
Salut,
tu as essayé "jtexfield.requestFocus();"???
pour info:
public void requestFocus()
Description copied from class: Component
Requests that this Component get the input focus, and that this Component's
top-level ancestor become the focused Window. This component must be
displayable, visible, and focusable for the request to be granted. Every effort
will be made to honor the request; however, in some cases it may be impossible
to do so. Developers must never assume that this Component is the focus owner
until this Component receives a FOCUS_GAINED event. If this request is denied
because this Component's top-level Window cannot become the focused Window, the
request will be remembered and will be granted when the Window is later focused
by the user.
This method cannot be used to set the focus owner to no Component at all. Use
KeyboardFocusManager.clearGlobalFocusOwner()
instead.
Because the focus behavior of this method is platform-dependent, developers
are strongly encouraged to use