Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » How do you assign an icon to an ApplicationWindow?
How do you assign an icon to an ApplicationWindow? [message #449325] Fri, 21 January 2005 19:37
Bill Ewing is currently offline Bill EwingFriend
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");
}
Previous Topic:How to set Canvas focusable (with keyboard traverse)?
Next Topic:Browser widget on Linux and native crashes
Goto Forum:
  


Current Time: Sun Nov 17 12:19:14 GMT 2019

Powered by FUDForum. Page generated in 0.02014 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top