public ImagePanel(Image image) { try { this.fileImage = ImageIO.read(image.getImage()); } catch (Exception ex) { this.fileImage = null; } this.image = image; this.cacheImage = null; }
public void setImage(Image image) { if (this.image != null && this.image.equals(image)) { clear(); return; } try { this.fileImage = ImageIO.read(image.getImage()); } catch (Exception ex) { this.fileImage = null; } this.image = image; clear(); cacheImage = null; }