Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

BigDecimalEditor ignores 0

 
laila NiHai
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Sheriff
Pie
Posts: 20969
31
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


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
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Paul for pointing that out. I completely missed that detail. Thanks! It works great now!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic