Anonymous classes are allowed. If you think otherwise then you need a java certification book.

Neb, it seems that for an annoymous class to work you cannot have a named variable, so this should work:

new Cell() { public Cell() { this.setColumnSpan(3); }};
So you can't have a name and theirs no way to refer to them. Probably not what you are looking for, but anonymous classes ARE legal.