I'm having trouble adding a variable amount of labels to a panel. My problem is that for some reason when adding my clicklistener it returns void instead of widget (error). If I just have "new Label('xyz')" that works fine, but I need each panel to have their own clicklistener as well. Here is the code:
for(int x = 0;x<productIDArray.length();x++) {
mainPanel.add(new Label("Test").addClickListener(new ClickListener() {
@Override
public void onClick(Widget sender) {
// TODO Auto-generated method stub
}
}));
}