How do you assign an icon to an ApplicationWindow? [message #449325] |
Fri, 21 January 2005 19:37 |
Bill Ewing Messages: 49 Registered: July 2009 |
Member |
|
|
Initially, we were loading a gif file into an image and using setImage.
The problem with that is that the icon (a gif file in this case) was a
loose file in the application's folder.
We wanted to have the icon reside in our app's jar file that we make, so
we started doing it the following way. This seems to work, but is it
correct?
(BTW, we use instantiations.com SWT-designer to do GUI design. I'm not
sure what below is pure SWT and what might be unique to them)
protected void configureShell(Shell newShell) {
super.configureShell(newShell);
shell = newShell;
newShell.setImage(ResourceManager.getImageDescriptor(MainWin dow.class,
"images/icon.gif").createImage());
newShell.setText("title of app");
}
|
|
|
Powered by
FUDForum. Page generated in 0.02889 seconds