Perry Smith

Java Questions & Answers

Archive

Home / Java Q & A Archive Page 4 / Java Q & A Archive / Java Main Page

Numeric output in a JTextArea
Monday, 08-Mar-99 10:23:47
161.28.15.14 writes:
Maybe I'm an idiot, but I can't figure out how to, for example, do a simple calculation and have the output displayed in a JTextArea. I know it's probably really easy, but I would appreciate any help.

Abinadi Ehrisman


Response
Re: Numeric output in a JTextArea
Wednesday, 10-Mar-99 13:50:06
152.206.123.160 writes:
(I haven't used Swing components before ... All suggetions following are under the assumption that that they are functionally equivalent to AWT components even though they are implemented differently.)

Either use the .toString() method of the number or, if the JTextArea has a .append() method, you might use that.

MikeD


Home / Java Q & A Archive Page 4 / Java Q & A Archive / Java Main Page