Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Linux Archive
Java Tips
Java Tips Blog

Sponsored Links





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.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-24-2008, 09:13 AM
smartsubroto's Avatar
Member
 
Join Date: May 2008
Location: India,Kolkatta
Posts: 50
smartsubroto is on a distinguished road
Send a message via Yahoo to smartsubroto
[SOLVED] Auto complete Text.
Hi All,

I need a suggestion or code for Auto Complete Text in JTextField.

Thanks in advance..
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 06-24-2008, 09:33 AM
Eranga's Avatar
Moderator
 
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 4,609
Eranga has a spectacular aura aboutEranga has a spectacular aura about
Send a message via Yahoo to Eranga
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.
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 06-24-2008, 11:07 AM
smartsubroto's Avatar
Member
 
Join Date: May 2008
Location: India,Kolkatta
Posts: 50
smartsubroto is on a distinguished road
Send a message via Yahoo to smartsubroto
Ok let me see..

Thanks..
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 06-24-2008, 11:08 AM
Eranga's Avatar
Moderator
 
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 4,609
Eranga has a spectacular aura aboutEranga has a spectacular aura about
Send a message via Yahoo to Eranga
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.
Bookmark Post in Technorati
Reply With Quote
  #5 (permalink)  
Old 06-24-2008, 01:19 PM
smartsubroto's Avatar
Member
 
Join Date: May 2008
Location: India,Kolkatta
Posts: 50
smartsubroto is on a distinguished road
Send a message via Yahoo to smartsubroto
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...
Bookmark Post in Technorati
Reply With Quote
  #6 (permalink)  
Old 06-24-2008, 01:35 PM
Eranga's Avatar
Moderator
 
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 4,609
Eranga has a spectacular aura aboutEranga has a spectacular aura about
Send a message via Yahoo to Eranga
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.
Bookmark Post in Technorati
Reply With Quote
  #7 (permalink)  
Old 06-24-2008, 04:21 PM
sukatoa's Avatar
Senior Member
 
Join Date: Jan 2008
Location: Cebu City, Philippines
Posts: 527
sukatoa is on a distinguished road
Send a message via Yahoo to sukatoa
Quote:
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.
Bookmark Post in Technorati
Reply With Quote
  #8 (permalink)  
Old 06-25-2008, 06:35 AM
Eranga's Avatar
Moderator
 
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 4,609
Eranga has a spectacular aura aboutEranga has a spectacular aura about
Send a message via Yahoo to Eranga
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.
Bookmark Post in Technorati
Reply With Quote
  #9 (permalink)  
Old 06-26-2008, 02:57 PM
smartsubroto's Avatar
Member
 
Join Date: May 2008
Location: India,Kolkatta
Posts: 50
smartsubroto is on a distinguished road
Send a message via Yahoo to smartsubroto
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.
Bookmark Post in Technorati
Reply With Quote
  #10 (permalink)  
Old 06-27-2008, 06:05 AM
Eranga's Avatar
Moderator
 
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 4,609
Eranga has a spectacular aura aboutEranga has a spectacular aura about
Send a message via Yahoo to Eranga
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.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Unsupported Content-Type: text/html Supported ones are: [text/xml] luislopezco Advanced Java 0 05-26-2008 06:26 PM
IDE with auto completion? iceflyin New To Java 8 04-21-2008 03:07 PM
Developing a complete application in java, help needed omaradib New To Java 2 03-10-2008 02:24 PM
Error : Runnable did not complete within 10000ms piyushgpt1 Advanced Java 1 02-05-2008 09:04 PM
help to complete final part of project dirtycash New To Java 6 12-31-2007 08:21 AM


All times are GMT +3. The time now is 12:21 AM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org