You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ComboBoxEmbeddedInDiv.java 716B

12345678910111213141516171819202122232425
  1. package com.vaadin.tests.components.combobox;
  2. import com.vaadin.server.VaadinRequest;
  3. import com.vaadin.tests.components.AbstractTestUI;
  4. import com.vaadin.ui.ComboBox;
  5. import com.vaadin.ui.Label;
  6. import com.vaadin.ui.VerticalLayout;
  7. public class ComboBoxEmbeddedInDiv extends AbstractTestUI {
  8. @Override
  9. protected void setup(VaadinRequest request) {
  10. VerticalLayout vl = new VerticalLayout();
  11. for (int i = 0; i < 20; i++) {
  12. vl.addComponent(new Label("" + i));
  13. }
  14. ComboBox<String> cb = new ComboBox<>();
  15. vl.addComponent(cb);
  16. for (int i = 0; i < 20; i++) {
  17. vl.addComponent(new Label("" + i));
  18. }
  19. addComponent(vl);
  20. }
  21. }