Search code examples
javagwtsmartgwt

What is the difference between addMembers(...) and setMembers(...) in SmartGWT


What is the difference between using SmartGWT's addMembers vs. setMembers methods for adding components to a form layout?

mainLayout.addMember(northLayout);
mainLayout.addMember(southLayout);

or

mainLayout.addMembers(northLayout, southLayout);

vs.

mainLayout.setMembers(northLayout,southLayout);

Thank you!!


Solution

  • Take a look at the source code: http://www.google.com/codesearch/p?hl=en#IbhKj4VngGk/trunk/main/src/com/smartgwt/client/widgets/layout/Layout.java&q=setmembers%20package:http://smartgwt%5C.googlecode%5C.com&l=1039 in the end, setMembers call addMember for each one, plus removing existing