![Afirmando](http://static.forosdelweb.com/fdwtheme/images/smilies/afirmar.gif)
Saludos
| |||
Del API: Cita: The java.awt.TextField could be monitored for changes by adding a TextListener for TextEvent's. In the JTextComponent based components, changes are broadcasted from the model via a DocumentEvent to DocumentListeners. The DocumentEvent gives the location of the change and the kind of change if desired. The code fragment might look something like: DocumentListener myListener = ??; JTextField myArea = ??; myArea.getDocument().addDocumentListener(myListene r); ![]() |
| |||
Con AWT se usaba TextListener, con Swing se usa DocumentListener. Mira un tutorial actualizado sobre Swing y los campos de texto y te lo explicará con ejemplos. En el tutorial de Sun: http://java.sun.com/docs/books/tutor...neraltext.html te explica como hacer muchas cosas con los componentes de texto. S! |