Update gallery.java