Java - jFrame Listeners

35 views Asked by At

I am trying to make it so when a person starts to type in a textfield it will instantly start to put that text at the end of another textfield. I will be using this for a file path.

1

There are 1 answers

0
AngelTrs On

To detect and track changes to the text content of a JTextfield, you have to add a DocumentListener to the document of the JTextField.

Please see this Oracle Tutorial: https://docs.oracle.com/javase/tutorial/uiswing/events/documentlistener.html