List (SWT)
org.eclipse.swt.widgets.List
Listen werden mit SWT wie folgt erzeugt:
List list = new List(shell, SWT.BORDER | SWT.MULTI | SWT.V_SCROLL); for (int i = 0; i < 10; i++) { list.add("Listeneintrag " + i); } list.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent event) { int[] selectedItems = list.getSelectionIndices(); for (int i = 0; i < selectedItems.length; i++) System.out.println(selectedItems[i]; } });