A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Swing / AWT / SWT
problem with JTextField
Joined: Apr 15, 2004
Jan 18, 2005 07:44:00
pls someone how do u retrieve information from ur textfield once it has
been entered by a user into the textfield and u do not want to use a button?
how do you go about writting an actionlistener for a JTextFiled?
thx in advance
Joined: Sep 05, 2000
Jan 18, 2005 09:21:00
Do you want to retrieve the data by the user hitting the Enter key or on a tab out of the field?
Joined: Jul 30, 2003
Jan 18, 2005 13:58:00
Hi, Kelly -
Three quick tips:
1. If you spell as badly in your source code as you do in your posts, you'll spend much of your time tracking down compiler errors. Computers require precision.
2. If you read the
Tutorial, a free in-depth resource available through
Sun's Java site
, you'll find the answers to most if not all of your questions.
3. If you find the answer yourself, you will always have it. If someone else gives you all your answers, you'll never get it.
Give a man a fish, he'll eat for one day. Teach a man to fish, he'll drink all your beer.
Cheers, Jeff (SCJP 1.4, SCJD in progress, if you can call that progress...)
Ko Ko Naing
Joined: Jun 08, 2002
Jan 18, 2005 20:59:00
Why are you posting duplicated threads?
got the same topic as this thread. I do suggest you to focus on one thread so that you can get people replies in the same place...
BTW, have you tried DocumentListener as I told you in that thread? It will surely help you...
SCMAD Exam Guide
, Author of
SCJP1.2, CCNA, SCWCD1.4, SCBCD1.3, SCMAD1.0, SCJA1.0, SCJP6.0
Joined: Jan 26, 2004
Jan 20, 2005 11:32:00
I think KeyListener and FocusListener is the other way to retrieve data from textfield.
I agree. Here's the link:
subject: problem with JTextField
counter for JSP page
Need to limit the text
checking textfields for a stream
Input Textfield Background Color When the Cursor Is There
cant figure this out
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015