File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes Previous Search history for JtextField in swings Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Previous Search history for JtextField in swings " Watch "Previous Search history for JtextField in swings " New topic
Author

Previous Search history for JtextField in swings

kumar Boin
Greenhorn

Joined: Apr 18, 2012
Posts: 1
Hi i am looking for a sample code for Previous Search history for

JtextField which is useful for my GUI based application

Description:I am having a JPanel that contains a large Jlist of

items..for which i developed a search feature with jtextfield ..to

search for the intended item from the jlist.I am looking for a sample

code to display previous search history in jtextfield when we try to

search the jlist Previous Search history for JtextField in swings
William P O'Sullivan
Ranch Hand

Joined: Mar 28, 2012
Posts: 859

Ajax. Plenty of type-ahead examples out there on the web.

WP
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18987
    
    8

Ajax? But the question is about Swing, not about Web applications. You must have misread the question, WP.

As for "sample code", we don't do that here. (Read NotACodeMill for example.) But if you posted some code which you already had, and asked some questions about it, we could certainly work on getting those questions answered.

And welcome to the Ranch, by the way!

William P O'Sullivan
Ranch Hand

Joined: Mar 28, 2012
Posts: 859

It doesn't matter if it's awt, swing etc.. the component (textfield) needs to trigger Javascript
which will trigger an ajax call to look up prior searches and attempt to autocomplete.

JSF is quite cool this way, but any real simple HTML page can also use this method.

WP
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4664
    
    5

William P O'Sullivan wrote:It doesn't matter if it's awt, swing etc.

Sure it does.

William P O'Sullivan wrote:the component (textfield) needs to trigger Javascript

Whatever for? And who executes the JavaScript?

The question is about a standalone application, not about something that runs in a browser.

William P O'Sullivan wrote:JSF is quite cool this way, but any real simple HTML page can also use this method.

Possibly true, and totally irrelevant.

Please read the question again. It doesn't have anything to do with an HTML page, real simple or otherwise.


luck, db
There are no new questions, but there may be new answers.
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4664
    
    5

kumar Boin wrote:... in swings

Swing Is A Proper Noun

And welcome to the Ranch!

edit Please BeForthrightWhenCrossPostingToOtherSites
http://www.java-forums.org/awt-swing/58542-previous-search-history-jtextfield-swings.html
http://www.javaprogrammingforums.com/awt-java-swing/15227-previous-search-history-jtextfield-swings.html
https://forums.oracle.com/forums/thread.jspa?threadID=2377577
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Previous Search history for JtextField in swings