Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

appending text to JTextfield

807600Oct 7 2007 — edited Oct 8 2007
i have a jtextfield called dollarOutput and what i am trying to do is when a given button is clicked, append a number to the end of the textfield. this is what i have:
dollarOutput.append(button.getText());
but it throws an error saying:

Error: H:\Fall 07\CIS 235\Homeworks\HW6\DollarConverter.java:154: cannot find symbol
symbol : method append(java.lang.String)
location: class javax.swing.JTextField

am i using this method correctly? i couldnt find it in the API and every example i see using it is in this form. any help would be greatly appreciated
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 5 2007
Added on Oct 7 2007
4 comments
808 views