Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Auto Complete JTextField

 
Andraz Poje
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi. I found some code but I do not know how to use it:
http://www.java2s.com/Code/Java/Swing-JFC/AutocompleteTextField.htm
How do I use this code?
 
Rob Spoor
Sheriff
Pie
Posts: 20606
60
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to our GUI forum.
 
Paul Clapham
Sheriff
Posts: 21316
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You provide a list of the possible strings which are the targets of autocompletion, then pass that list to an instance of the class:
 
Piyush Patel
Ranch Hand
Posts: 127
Android Firefox Browser Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi Andraj,
i found same problem ..
i think we should attach searching kind of thing to JTextField , instead of extending jTextField ..
does any one have idea on this?
 
Maneesh Godbole
Saloon Keeper
Posts: 11092
13
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you try out Paul's suggestion? Does it work?
 
Piyush Patel
Ranch Hand
Posts: 127
Android Firefox Browser Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi, all i found very easy and effective Auto Complete Text Field at jSuggest Text Field - Search as you type
hope this will help all ranchers.

 
Andraz Poje
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Piyush Patel wrote:hi, all i found very easy and effective Auto Complete Text Field at jSuggest Text Field - Search as you type
hope this will help all ranchers.

It Works! Thanks.
 
Sanjeev Charla
Ranch Hand
Posts: 90
Firefox Browser Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Piyush Patel wrote:hi, all i found very easy and effective Auto Complete Text Field at jSuggest Text Field - Search as you type
hope this will help all ranchers.



Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic