• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to convert arabic numbers received from JTextField to a Double?

 
raminaa niilian
Ranch Hand
Posts: 551
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
Thank you for reaidng my post.
I have a Swing application which users enter some infomation in its boxes. some of the information are arabic numbers like ۱۲۳.۵ which is an arabic double number.
I am able to convert a long number simply using Long.parsLong(number) but when I use Double.parsDouble(num) I get the following error:



Is there any solution for this?

Thanks.
 
pete stein
Bartender
Posts: 1561
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Google tells me to parse with a DecimalFormat object. It'll likely be able to tell you the details.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic