[Advanced-java] strange exception
Joerg Thoennes
Joerg.Thoennes at macd.com
Thu Mar 6 07:44:28 2003
Alvin Wang wrote:
> I got a strange exeption on my Swing application. The exception stack is not
> started from my code. This exception is sometimes risen when I click a
> JTable. Can any guru give some hints? Thanks so much!
> java.lang.IllegalArgumentException: Cannot format given Object as a Number
The object stored in this table cell cannot be formattted as a number. Normally,
the JTable checks for the type of the object stored and chooses an appropriate formatter.
But if you specified in some way that this cell must be a number, JTable has no other
way than to try it...
> at java.text.NumberFormat.format(NumberFormat.java:219)
> at java.text.Format.format(Format.java:133)
In addition, I had a quick look at the Java sources, be did not found anything special or
unexpected.
So please post some of your code implementing the JTable. I think there could be a problem.
Cheers, Jörg
--
Joerg Thoennes
http://macd.com
Tel.: +49 (0)241 44597-24 Macdonald Associates GmbH
Fax : +49 (0)241 44597-10 Lothringer Str. 52, D-52070 Aachen