diff --git a/src/magic/ui/widget/TransparentImagePanel.java b/src/magic/ui/widget/TransparentImagePanel.java index 753f2d7c72..33e143f07e 100644 --- a/src/magic/ui/widget/TransparentImagePanel.java +++ b/src/magic/ui/widget/TransparentImagePanel.java @@ -2,7 +2,6 @@ package magic.ui.widget; import java.awt.Graphics; import java.awt.Graphics2D; -import java.awt.Image; import java.awt.image.BufferedImage; import java.awt.image.RescaleOp; @@ -12,7 +11,7 @@ public class TransparentImagePanel extends JPanel { private static final long serialVersionUID = 1L; - private Image image=null; + private BufferedImage image=null; private RescaleOp rescaleOp=null; public void setOpacity(final float opacity) { @@ -27,7 +26,7 @@ public class TransparentImagePanel extends JPanel { } } - public void setImage(final Image image) { + public void setImage(final BufferedImage image) { this.image=image; } @@ -39,7 +38,7 @@ public class TransparentImagePanel extends JPanel { g.drawImage(image,0,0,this); } else { final Graphics2D g2d=(Graphics2D)g; - g2d.drawImage((BufferedImage)image,rescaleOp,0,0); + g2d.drawImage(image,rescaleOp,0,0); } } }