Solved

Textfiled unenditable?

Posted on 1997-03-30
3
226 Views
Last Modified: 2010-04-16
Hi, I have some trouble using the textfield.
I defined it in the class like
textfield t1,t2;
t1 = new textfield(10);

But, later in the program, it draws the textfiled and I seems
to be unable to enter anything in it.  Just like the textarea
set to Edit=False.  I am not sure what happened, or is there
anything I need to do to enter in a text filed.  Please help.
0
Comment
Question by:jiayan
3 Comments
 

Expert Comment

by:lptsang3
ID: 1219314
I don't know exactly why you can't enter the textfield.  But try the following if this works:

TextField t1;
t1 = new TextField(10);

t1..enable();
t1.requestFocus();

0
 

Author Comment

by:jiayan
ID: 1219315
Actually, I solved it by using method action instead of handlemethod, not sure why it works:-( but it worked:-)
0
 

Accepted Solution

by:
IsaacW earned 30 total points
ID: 1219316
jiayan,

use this code:

Textarea t;
t.setEditable(true);

Hope this helps.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
jdbc error in jsp application 20 63
hibernate example issues from command prompt 10 50
spring jars download 1 35
running on tomcat not jboss eap 7.0 3 17
An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…

789 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question