Solved

Textfiled unenditable?

Posted on 1997-03-30
3
228 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

729 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