By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,068 Members | 1,210 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,068 IT Pros & Developers. It's quick & easy.

How to add a backspace in calculator.java using swing?and remove the decimal

P: n/a
how to add a backspace in calculator.java using swing?and remove the decimal
Oct 17 '10 #1
Share this Question
Share on Google+
1 Reply


Nepomuk
Expert 2.5K+
P: 3,112
I'm guessing the decimals are shown in a TextField? If so, the TextField has a setText method which you are probably using already and the String class has a substring function as well as a length method. Combine those to modify your decimal.

If you're not using a TextField, you'll have to give us some more information.

Greetings,
Nepomuk
Oct 19 '10 #2

Post your reply

Sign in to post your reply or Sign up for a free account.