I want to display a file tree similarly to java2s.com \'Create a lazy file tree\', but include the actual system icons - especially for folders. SWT does not seem to offer t
For files, you can use org.eclipse.swt.program.Program to obtain an icon (with correct set transparency) for a given file ending:
File file=...
String fileEnding = file.getName().substring(file.getName().lastIndexOf('.'));
ImageData iconData=Program.findProgram(fileEnding ).getImageData();
Image icon= new Image(Display.getCurrent(), iconData);
For folders, you might consider just using a static icon.