Wednesday, March 30, 2011

Re: why are important methods in HTMLTable protected?

Hehe HTMLTable does not define an initWidget method. You accidentally called the initWidget of ContainerWidget in your constructor of FrontContentPanel. Thus during initialization ContainerWidget.initWidget is called twice which will cause the exception you received. initWidget is only defined in a class that extends Composite. Your second code snipped works because you changed FrontContentPanel to extend Composite. Now FrontContentPanel calls its own initWidget method.

If you really need a custom HTMLTable then you can simply extend it and in its constructor call setCell/Row/ColumnFormatter(...) with custom Formatter classes that extend HTMLTable.Cell/Row/ColumnFormatter (see Grid constructor or FlexTable constructor in GWTs source code. They do pretty much the same). 

You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

No comments:

Post a Comment