hi, i am writing a program whereby i'll have twoo text fields and once i enter a text in one text field, i want it to display in the other textfield without me clicking on any buttons, the only button there will be the exit button.in the textvaluechanged method of the textfield, how do i get it to return true if there is something written in the textfield? help pls this textListener is kinda new to me. how do use the actionlis tener with getting a value in the JTexxfield or know when something has been typed in the field?
If you want the text to appear in both fields as it is being typed, you will want a Key Listener. Text Listener informs you that a field has been changed once the change is complete. Take a look at the Java Tutorial chapter on How to Write a Key Listener for examples.