• 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

how to create a drop down list below the text field after receiving the key event ?

 
Ranch Hand
Posts: 692
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
what i want to make using swing is suppose i have a textfield and user always enters a ip address for eg :127.0.0.1 so each time user start entering the ip address like 127 my textfield should show a drop down list below the textfield which will show all the ip address starting with 127
what are the options to make such a thing ..i have initiated the process with JList but it didnt help
can any one help me ?
 
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
asked and answered 1000's of times - google 'autocomplete' + other appropriate keywords
 
naved momin
Ranch Hand
Posts: 692
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Michael Dunn wrote:asked and answered 1000's of times - google 'autocomplete' + other appropriate keywords



thanks but the code which they are showing is a bit difficult to understand ....do you have any code that is simple straight ?
 
naved momin
Ranch Hand
Posts: 692
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
is there any class JSuggestionField which can help me make a autocomplete field
if not than what is the another way of doing this with the jtextfield i m sure you guyz out there have many alternatives
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
> thanks but the code which they are showing is a bit difficult to understand

there are ready-to-go .jars out there, no need to understand how they work (although at times it is handy)
 
Rancher
Posts: 3324
32
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

thanks but the code which they are showing is a bit difficult to understand



Do you think people write complex code for the fun of it?

do you have any code that is simple straight ?



What makes you think the code for this requirement is simple and straight?

 
reply
    Bookmark Topic Watch Topic
  • New Topic