Change the icon in the Alt+Tab window (Windows).
public void setImage(Image image)
The image of a shell is typically displayed when the shell is iconified.
public void setImages(Image[] images)
You can use the following methods to get the image (images) of a shell:
public Image getImage()
public Image[] getImages()
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
public class ShellSmallImage {
public static void main(String[] args) {
final Display display = new Display();
final Shell shell = new Shell(display);
Image small = new Image(display,"yourFile.gif");
shell.setImage(small);
shell.open();
// Set up the event loop.
while (!shell.isDisposed()) {
if (!display.readAndDispatch()) {
// If no more entries in event queue
display.sleep();
}
}
display.dispose();
}
}