public ArrayList<String> getImageNames() {
        ArrayList<String> imageNames = new ArrayList<String>();
        if (DIR.isDirectory()) {
            for (File f : DIR.listFiles(IMAGE_FILTER)) {
                BufferedImage img = null;

                try {
                    img = ImageIO.read(f);
                    imageNames.add(f.getName());
                } catch (Exception e) {
                    //add handling code here
                    e.printStackTrace();
                }
            }
        }
        return imageNames;
    }