Photo collage generator in Java