public void drawBox(Graphics g) { for (Box i : boxList) { g.drawImage(i.getImage(), i.getX(), i.getY(), i.getWidth(), i.getHeight(), null); } }