Results 1 to 9 of 9
Thread: JTextfield Ajax Searching
- 08-29-2009, 09:48 AM #1
Member
- Join Date
- Aug 2009
- Posts
- 66
- Rep Power
- 0
- 08-29-2009, 11:21 AM #2
Senior Member
- Join Date
- Aug 2009
- Posts
- 2,388
- Rep Power
- 6
AJAX stands for Asynchronous Javascript and is a web applications trick for fooling users into thinking that they are getting their pages refreshed without a submit to the server.
It has nothing to do with a JTextfield because that is a swing component which cannot be used in web applications.
You are going to have to implement it all using Java.
Just put a listener for the key presses on the JTextfield and call a refresh method that updates whatever needs to be updated with data from the database.
-
.... or a DocumentListener if you want to listen for paste/cut events as well.
- 08-29-2009, 03:42 PM #4
Member
- Join Date
- Aug 2009
- Posts
- 66
- Rep Power
- 0
any suggestions for Events in Netbeans? :D
I see..great palz
- 08-29-2009, 03:49 PM #5
Senior Member
- Join Date
- Aug 2009
- Posts
- 2,388
- Rep Power
- 6
Events have nothing to do with Netbeans. Remember that Netbeans is just a tool where you can write code. How you write the code should not have anything to do with whether you used Netbeans, Eclipse or notepad. In fact if you are still learning the Java basics I would suggest not using any IDE at all and just sticking to Textpad or notepad++.
Here is the tutorial link to get you started with writing KeyListeners.
- 08-30-2009, 02:01 PM #6
Member
- Join Date
- Aug 2009
- Posts
- 66
- Rep Power
- 0
- 08-30-2009, 09:19 PM #7
Senior Member
- Join Date
- Aug 2009
- Posts
- 2,388
- Rep Power
- 6
As you can see then the IDE is now getting into your way and actually preventing you from meeting your deadline. Writing event listeners is not very complicated but if you have lots of code generated for you by the IDE and you are fairly new to Java then you would find it difficult to integrate your code into the IDE's code.
Better read the tutorial link I posted, try some code and post if you get problems with your code.
- 09-16-2009, 03:37 PM #8
Member
- Join Date
- Aug 2009
- Posts
- 66
- Rep Power
- 0
is it means, everytime I press on keyboard, it automatically search the database?
how to make the GUI like drop down on google in Java? :p
- 09-16-2009, 03:39 PM #9
Senior Member
- Join Date
- Aug 2009
- Posts
- 2,388
- Rep Power
- 6
Similar Threads
-
how to access jTextField of one JFrame1 from JFrame2 & Modify JTextField contents
By sumit1mca in forum AWT / SwingReplies: 1Last Post: 01-30-2009, 06:44 PM -
Jsp with Ajax
By sundarjothi in forum JavaServer Pages (JSP) and JSTLReplies: 16Last Post: 09-25-2008, 10:29 AM -
AJAX in JSP
By haiforhussain in forum JavaServer Pages (JSP) and JSTLReplies: 8Last Post: 07-01-2008, 02:12 PM -
Example for Ajax-JSP
By smrithi in forum JavaServer Pages (JSP) and JSTLReplies: 8Last Post: 06-02-2008, 02:00 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks