Class<?>[] components = { Button.class, CheckBox.class,
DateField.class, NativeButton.class, Link.class, Label.class,
Panel.class, Slider.class, TextArea.class, TextField.class,
Upload.class };
for (Class<?> clazz : components) {
Component c;
try {
c = (Component) clazz.newInstance();
} catch (Exception e) {
e.printStackTrace();
continue;
}
c.setCaption(clazz.getSimpleName());
c.setIcon(icon);
gl.addComponent(c);
}
// TabSheet, caption + tab icons
TabSheet tabs = new TabSheet();