Love Yao
18 Nov 2009, 12:25 AM
in one formpanel, i input the Number.
then submit,
in another LayoutContainer , it shows the (Number) contentpanels.
the submit button:
button.addSelectionListener(new SelectionListener<ButtonEvent>() {
public void componentSelected(ButtonEvent ce) {
int i = Integer.parseInt(field.getValue());
while (i > 0) {
ContentPanel contentPanel = new ContentPanel();
contentPanel.setHeading("new"+i);
contentPanel.addText("new"+i);
layContentPanel.setHeading("change");//success
layContentPanel.add(contentPanel);//no effect
i--;
}
}
});
somehow i Know the coding is wrong.
but by which way can i do it.
to add contentPanels Dynamicly.
thanks
thanks
thanks
thanks
thanks
thanks
then submit,
in another LayoutContainer , it shows the (Number) contentpanels.
the submit button:
button.addSelectionListener(new SelectionListener<ButtonEvent>() {
public void componentSelected(ButtonEvent ce) {
int i = Integer.parseInt(field.getValue());
while (i > 0) {
ContentPanel contentPanel = new ContentPanel();
contentPanel.setHeading("new"+i);
contentPanel.addText("new"+i);
layContentPanel.setHeading("change");//success
layContentPanel.add(contentPanel);//no effect
i--;
}
}
});
somehow i Know the coding is wrong.
but by which way can i do it.
to add contentPanels Dynamicly.
thanks
thanks
thanks
thanks
thanks
thanks