I am using EXT-GWT2.01 and GWT1.7 and added two contentPanel into a HorizontalPanel.

ContentPanel one = new ContentPanel();
one.add(new Grid());

ContentPanel two = new ContentPanel();
two.add(new LabelField("text"));

HorizontalPanel hp = new HorizontalPanel();

Since i have hide the second contentPanel inorder to show only the first contentPanel initially.

Now on the click of the button on the toolbar, i want to hide the first contentPanel and show the second contentPanel which was hidden earlier.

on the click of the toggleButton

if(contentPanelone.isVisible()) {

The problem is that the one contentPanel does hide but it did not show the second contentPanel on the call for two.show();

Can anyone help me on the same?