• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Previous Search history for JtextField in swings

 
kumar Boin
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 859
Chrome IBM DB2 Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ajax. Plenty of type-ahead examples out there on the web.

WP
 
Paul Clapham
Sheriff
Posts: 21001
31
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 859
Chrome IBM DB2 Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5125
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic