File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP 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: 18712

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!
I agree. Here's the link:
subject: BigDecimalEditor ignores 0