• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JTextField in GUI

 
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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,


 
reply
    Bookmark Topic Watch Topic
  • New Topic