Re: Funky problem with JTable cell rendering

From: Christian Kaufhold (usenet_at_chka.de)
Date: 01/04/05


Date: Tue, 4 Jan 2005 14:37:38 +0000 (UTC)

Jan Danielsson <jan.danielsson@gmail.com> wrote:

>> Your implementation is wrong in some places:
>> 1. It will fail with an exception if the TableModel happens to have
>> zero rows at one time.
>
> How come? When does getColumnClass() get called, other than when there
> are rows?

By default, probably never. But nowhere is it stated that the class of
column is not undefined just because there are no rows.

Christian



Relevant Pages

  • Re: Benefits of Dynamic Typing
    ... The latter problem is detected in parts not specific to the compiler, ... and the only information about the reason is carried by the exception ... the entire Map call fails with the same exception. ... but it did expect that some application might fail. ...
    (comp.lang.functional)
  • Re: IllegalArgumentException vs. NullPointerException and collection behavior
    ... There is an advantage to declaring a checked exception - it forces client programmers to pay attention to it. ... The trouble with throwing any RuntimeException is that the API clients might fail abruptly because their programmers didn't pay close enough attention to the Javadocs. ... Throw a checked Exception if the client should have been able to count on getting a result, and you want to force awareness of any out-of-band problems. ...
    (comp.lang.java.help)
  • Re: INVALID_HANDLE_VALUE vs. NULL
    ... 0 (zero) can never be a valid handle value. ... Of course, ReadFilewill fail with this handle, ... > CloseHandle() does indeed fail when given a bad handle. ... > case it raises an exception. ...
    (microsoft.public.win32.programmer.kernel)
  • Re: Try..Except fails. Also - any other ways?
    ... case - you see, the file i'm testing on - a log file, is getting logged ... it fail, or if it does fail - for this to be handled. ... Btw - Any ideas why the catch-all exception handling didn't work either ... You will get a 'bad' Handle -1 if FileOpen fails ...
    (comp.lang.pascal.delphi.misc)
  • Re: trouble passing float array from C to java method
    ... running in the background and calling my Java function when it gathers ... After every call to JNI you should check for errors (there are, in fact, a few ... This can fail. ... This can fail by throwing a Java exception. ...
    (comp.lang.java.programmer)