Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JTextField in GUI

 
pramod karnani
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

is it possible to get complete name in Jtextfield , let say user types letter 'B' , he should get all the name start from B for e.g Buonarotti & Company ,Bitter Homes & Gardens in text box in GUI.
if he types letter 'S' ,he should get all the name start from S for e.g Swanders & Flaughn in text box.
is it doable in swing?

please reply

thanks
pramod
 
Amir Iqbal
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hey pramod,
in my opinion it is possible, you have to attach a changeListener with this textfield and then in action method you have to fetch the text from textfield.
then you have to call a traverse an array of dictionary for words and dynamically fetch all those words whose starting character is the same with one of the user input starter.
got it?

if you need further assistance then feel free to ask.

Note:
Also search on "auto complete" and "intellisense". ok because these two terms are used for your problem

Regards,


 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic