void changeImage(String path) added to ImagePanel.
This commit is contained in:
parent
573518d14b
commit
1c847c06ae
@ -22,4 +22,8 @@ public class ImagePanel extends JPanel{
|
||||
g.drawImage(image, 0, 0, null); // see javadoc for more info on the parameters
|
||||
}
|
||||
|
||||
public void changeImage(String path) throws IOException {
|
||||
image = ImageIO.read(new File(path));
|
||||
repaint();
|
||||
}
|
||||
}
|
@ -14,6 +14,7 @@ public class WallDrawer extends ImagePanel implements Drawer {
|
||||
|
||||
@Override
|
||||
public void draw() {
|
||||
|
||||
setVisible(true);
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user