[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.platform.swt] How do you assign an icon to an ApplicationWindow?
|
- From: ewing@xxxxxxxxx (Bill Ewing)
- Date: Fri, 21 Jan 2005 19:37:47 +0000 (UTC)
- Newsgroups: eclipse.platform.swt
- Organization: Eclipse.org
- User-agent: NewsPortal/0.34 (http://florian-amrhein.de/newsportal/)
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(MainWindow.class,
"images/icon.gif").createImage());
newShell.setText("title of app");
}