Reputation: 35282
How to check if a GWT Panel (VerticalPanel, HorizontalPanel, etc.) is empty?
I used this code:
if (contactListPanel.getWidget(0) == null) {
// stuff
}
However, it throws an exception:
java.lang.reflect.InvocationTargetException
....
Caused by: java.lang.IndexOutOfBoundsException
Upvotes: 1
Views: 813
Reputation: 76908
Erm ... getWidgetCount()
would seem to be what you're looking for.
Upvotes: 1