Translate

Tuesday, February 21, 2012

What is LazyPanel convenience class in GWT and how to use it?

The gwt lazy panel has a createWidget method that is created when lazyPanel.setVisible("true") is called, making it possible to reduce initial loading of a panel. It is a convenience class to help lazy loading of a panel. The bulk of a LazyPanel is not instantiated until setVisible(true) or ensureWidget() is called.

This class primarily can be used in conjunction with StackPanel, DisclosurePanel, and TabPanel when the child panels contain relatively heavy weight contents. It can a speed your GWT UI load time if LazyPanel is used wisely.

Check out following links for more information:

API documentation link: http://google-web-toolkit.googlecode.com/svn/javadoc/1.6/com/google/gwt/user/client/ui/LazyPanel.html

Example link: http://ukitech.blogspot.in/2009/07/example-for-gwt-lazy-panel.html