Forums Register Login

JTextField question

+Pie Number of slices to send: Send
Is there any way to make an entry disappear once a user presses
enter. Eg John is typed into a textfield and once the user presses enter the textfield is once again blank
Thank you for your help.
+Pie Number of slices to send: Send

yup, there is.
When the enter (return) key is pressed in the TextField, an action event is generated and
you could add an action listner which will set the TextField
to " ".
One way of doing it.
regds.
- satya
This guy is skipping without a rope. At least, that's what this tiny ad said:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 675 times.
Similar Threads
How to write an event for "Enter" key?
User inputs
TextArea and ActionEvent
How to submit multiple records in one trip
JOptionPane Errors
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 18, 2024 23:33:44.