. , Java , , try. , catch, (, , Java) sure, , window.drawImage(). ( , ):
public class Wall extends Block
{
public Wall(int x, int y, int wdt, int hgt)
{super(x, y, wdt, hgt);}
public void draw(Graphics window)
{
Image wall;
try
{wall = ImageIO.read(new File("C:/eclipse/projects/Pong/wall.png"));}
catch (IOException e)
{
e.printStackTrace();
wall = new BufferedWindow(getWidth(), getHeight(), <Correct Image Type>);
}
window.drawImage(wall, getX(), getY(), getWidth(), getHeight(), null);
}
}