|
|
Welcome to the Java Forums.
You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:
- have access to post topics
- communicate privately with other members (PM)
- not see advertisements between posts
- have the possibility to earn one of our surprises if you are an active member
- access many other special features that will be introduced later.
Registration is fast, simple and absolutely free so please, join our community today!
If you have any problems with the registration process or your account login, please contact us.
|
|

06-24-2008, 09:13 AM
|
 |
Member
|
|
Join Date: May 2008
Location: India,Kolkatta
Posts: 50
|
|
|
[SOLVED] Auto complete Text.
Hi All,
I need a suggestion or code for Auto Complete Text in JTextField.
Thanks in advance..
|
|

06-24-2008, 09:33 AM
|
 |
Moderator
|
|
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 4,609
|
|
|
You have to use the key listener event for this. Each keyPressed event you can validate the letter with already stored data. When you do this for each key press by the user you can find the word.
__________________
Use an appropriate Subject. "Help, urgent!" isn't one. To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Has someone helped you? Then you can To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. their helpful post.
Want to make your IDE the best? To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
|

06-24-2008, 11:07 AM
|
 |
Member
|
|
Join Date: May 2008
Location: India,Kolkatta
Posts: 50
|
|
|
Ok let me see..
Thanks..
|
|

06-24-2008, 11:08 AM
|
 |
Moderator
|
|
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 4,609
|
|
|
Try and see. If you stuck with something ask here. I'll help you to solve it.
__________________
Use an appropriate Subject. "Help, urgent!" isn't one. To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Has someone helped you? Then you can To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. their helpful post.
Want to make your IDE the best? To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
|

06-24-2008, 01:19 PM
|
 |
Member
|
|
Join Date: May 2008
Location: India,Kolkatta
Posts: 50
|
|
|
Ya tried using key event.
Using key event i can catch the first character but how to match with the string and before that how to make String dynamic so that it will apeend the text inside it as many time the application is executed.
now i am trying to store the text in notepad and whenever the alphabet is type it will show the value from the notepad..
i dont know wheather it will work or not..
i need your help..
Thanks for your concern...
|
|

06-24-2008, 01:35 PM
|
 |
Moderator
|
|
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 4,609
|
|
|
Actually no need to use a notepad. By the code you can do it. Each newly typed word store in a List. Then on each key event go through the List and compare the same indexing character of user entered word and the searched word of the List.
__________________
Use an appropriate Subject. "Help, urgent!" isn't one. To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Has someone helped you? Then you can To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. their helpful post.
Want to make your IDE the best? To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
|

06-24-2008, 04:21 PM
|
 |
Senior Member
|
|
Join Date: Jan 2008
Location: Cebu City, Philippines
Posts: 527
|
|
Hi All,
I need a suggestion or code for Auto Complete Text in JTextField.
Thanks in advance..
Gather/Collect data.
Compare each data that was gathered,
show the desired data.
If your data are only basic texts, you can use compareToIgnoreCase(String str) method.
If they are locale dependent, use Collator class then set the Collator's strength.
__________________
A specific, detailed, simple, well elaborated, and "tested before asking" question may gather more quick replies. hopefully To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
|

06-25-2008, 06:35 AM
|
 |
Moderator
|
|
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 4,609
|
|
|
You got the logic, have to try something and let us know.
__________________
Use an appropriate Subject. "Help, urgent!" isn't one. To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Has someone helped you? Then you can To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. their helpful post.
Want to make your IDE the best? To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
|

06-26-2008, 02:57 PM
|
 |
Member
|
|
Join Date: May 2008
Location: India,Kolkatta
Posts: 50
|
|
|
hi all,
I solve my problem by using AutoComplete JCombo box.
Thank you all..
__________________
Thanks & Regards
Subroto Bhattacharjee To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
|

06-27-2008, 06:05 AM
|
 |
Moderator
|
|
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 4,609
|
|
|
Ok nice, if you solve this question please mark it as solved. Don't forget to do it next time too.
__________________
Use an appropriate Subject. "Help, urgent!" isn't one. To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Has someone helped you? Then you can To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. their helpful post.
Want to make your IDE the best? To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|