java - Drag and Drop into a Table SWT -
i'm starting swt , want able have table can drag file table , display file location in text within table. i've few examples when try myself error.
here offending code:
final table droptable = new table(shell, swt.border); for(int = 0; < 10; i++) { tableitem item = new tableitem(droptable, swt.none); item.settext("item " + i); } int operations = dnd.drop_move | dnd.drop_copy | dnd.drop_default; droptarget target = new droptarget(droptable, operations);
the error i'm getting eclipse "the constructor droptable(table, int) undefined". after looking @ javadocs, know droptable needs controller class , table not inherit class far aware.
i got code here: http://www.eclipse.org/articles/article-swt-dnd/dnd-in-swt.html#_drop_target
any information on how fix/do appreciated.
edit: solved error caused using java.awt import droptarget instead of swt import.
Comments
Post a Comment