Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

about JTextField

 
fei long
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, i have a simple question about JTextField. Is there a method I can use to delete the contents previously typed in JTextField, here I add a action listener in this text field. What i want is after i press enter i want the text in field to be deleted so that i can just enter another text again.
thanks.
 
Paul Stevens
Ranch Hand
Posts: 2823
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
setText("")
 
fei long
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks a lot.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic