sclass JGallery_v2 { JPanel panel = jpanel(new VScrollingWrapLayout); settable new ThumbnailCache thumbnailCache; void add(File imageFile) { if (imageFile == null) ret; addComponent(panel, new JThumbnailButton(thumbnailCache, imageFile)); } void addAll(Iterable imageFiles) { fOr (f : imageFiles) add(f); } L buttons() { ret childrenOfType(panel, JThumbnailButton); } JThumbnailButton findButton(ImageFile imageFile) { if (imageFile == null) null; ret first(buttons(), btn -> eq(btn.imageFile, imageFile)); } cachedVisual jscroll_vertical(panel); }