aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes output in a textfield. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "output in a textfield." Watch "output in a textfield." New topic
Author

output in a textfield.

omar nasir
Greenhorn

Joined: Jan 16, 2005
Posts: 4
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

Joined: Apr 15, 2004
Posts: 75
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 ]

kel
Alexandru Popescu
Ranch Hand

Joined: Jul 12, 2004
Posts: 995
Omar a good reading for understanding Swing is the free tutorial available at SUN: link

--
./pope
[the_mindstorm]


blog - InfoQ.com
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: output in a textfield.