aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes how to create a drop down list below the text field after receiving the key event  ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "how to create a drop down list below the text field after receiving the key event  ?" Watch "how to create a drop down list below the text field after receiving the key event  ?" New topic
Author

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

naved momin
Ranch Hand

Joined: Jul 03, 2011
Posts: 692

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 ?


The Only way to learn is ...........do!
Visit my blog http://inaved-momin.blogspot.com/
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
asked and answered 1000's of times - google 'autocomplete' + other appropriate keywords
naved momin
Ranch Hand

Joined: Jul 03, 2011
Posts: 692

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

Joined: Jul 03, 2011
Posts: 692

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

Joined: Jun 09, 2003
Posts: 4632
> 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)
Rob Camick
Ranch Hand

Joined: Jun 13, 2009
Posts: 2216
    
    7
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?

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to create a drop down list below the text field after receiving the key event ?