try
{
java.net.URL url = getClass().getResource("/images/Jalview_Logo.png");
+ java.net.URL urllogo = getClass().getResource("/images/Jalview_Logo_small.png");
if (url != null)
{
image = java.awt.Toolkit.getDefaultToolkit().createImage(url);
-
+ Image logo=java.awt.Toolkit.getDefaultToolkit().createImage(urllogo);
MediaTracker mt = new MediaTracker(this);
mt.addImage(image, 0);
- mt.waitForID(0);
- Desktop.instance.setIconImage(image);
+ mt.addImage(logo, 1);
+ do { try {
+ mt.waitForAll(); } catch (InterruptedException x) {};
+ if (mt.isErrorAny())
+ {
+ System.err.println("Error when loading images!");
+ }
+ } while (!mt.checkAll());
+ Desktop.instance.setIconImage(logo);
}
} catch (Exception ex)
{