File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

output in a textfield.

 
omar nasir
Greenhorn
Posts: 4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
first of all, thank you Andris Jekabsons for helping me in a previous post i made.

i have another problem, i need to make an applet that lets children learn the multiplication.

in the program i have 3 textfields & 3 labels:
Enter Number: [textfield]
Enter First multiple: [textfield]
Enter Last multiple: [textfield]

Explaination: the first number is the number to be multipled, the second one is the first multiple and the third is the last multiple. so if i enter 3, 5, 10 respectively, i will get an output of 5 X 3 = 15 all the way to 10 X 3 =30.

thats all, and then the output goes to a big textfield. what i need to know is how to make the output go to the big textfield, and how do i make the output stop at the last multiple? i know the method to let it start from the first multiple but how to make it stop? thankyou.
 
kelly devon
Ranch Hand
Posts: 78
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
to go to the big textfield u use the variable that contains the answers cha
nge it to a string eg ans(i.e varaible that contains ur answers)
String anstext is a string variable dat will allow u send the answer to the textfield but first u have to convert ur final answer to a string like below
String anstext = new Integer(ans).toString();(this converts it to a string)
bigtexfield.setText(anstext);
hope i helped

i dont understand wat method u are talking
[ January 18, 2005: Message edited by: kelly devon ]
 
Alexandru Popescu
Ranch Hand
Posts: 995
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Omar a good reading for understanding Swing is the free tutorial available at SUN: link

--
./pope
[the_mindstorm]
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic