This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
The moose likes IDEs, Version Control and other tools and the fly likes BigDecimalEditor ignores 0 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "BigDecimalEditor ignores 0" Watch "BigDecimalEditor ignores 0" New topic

BigDecimalEditor ignores 0

laila NiHai
Ranch Hand

Joined: Oct 18, 2010
Posts: 35
Hello, I used the example of IntegerCellEditor given by Sun and adjusted to BigDecimalCellEditor; however, I cannot get the editor to see 0.0 and 0.01 as a valid entries. Not sure what I am missing... Any help would be greatly appreciated.

Paul Clapham

Joined: Oct 14, 2005
Posts: 19687

So 0 is not a valid input, because it's less than this "minimum" value. As for 0.01, it's probably less than this value too: read the API documentation for BigDecimal, which explains why you should use another BigDecimal constructor instead of the one you used.
laila NiHai
Ranch Hand

Joined: Oct 18, 2010
Posts: 35
Thank you Paul for pointing that out. I completely missed that detail. Thanks! It works great now!
jQuery in Action, 3rd edition
subject: BigDecimalEditor ignores 0
It's not a secret anymore!