private ArrayList<PrinterProfile> printersList = null;
private ArrayList<PrinterProfile> printers = null;
...
void Method() {
...
printers = (ArrayList<PrinterProfile>) listOp.getPrinters();
printersList.setListData(printers.toArray(new PrinterProfile[0]));
}
setListData is only for JList but I am using SWT and ArrayList
I think what you are searching for is the SWT
List. You can use it like this:Since you already used JFace Viewers in your previous questions, I would suggest using a
ListViewerhere as well.Note:
Since you are already familiar with
TableViewer, why not use one with only one column andsetHeaderVisible(false)andSWT.MULTIas style? It would basically have the same effect.