URL url = getImageURL(); if (url == null) imageState = (byte) MediaTracker.ERRORED; else if (!(loadOnDemand && !itsTime)) imageIcon = new ImageIcon(url); else imageState = (byte) MediaTracker.LOADING;
loading = true; reloadImage = false; haveWidth = false; haveHeight = false; image = null; width = 0; height = 0; try { loadImage(); updateSize(); } finally { loading = false; }
  void reloadImage(boolean itsTime)  {    URL url = getImageURL();    if (url == null)      imageState = (byte) MediaTracker.ERRORED;    else if (!(loadOnDemand && !itsTime))      imageIcon = new ImageIcon(url);    else      imageState = (byte) MediaTracker.LOADING;  }