import java.io.File; import java.awt.CardLayout; import javax.swing.ImageIcon; import javax.swing.JFrame; public class ImageWindow extends JFrame { private CardLayout card; public ImageWindow() { this.card = new CardLayout(); File resourcesDirectory = new File("../resources/"); if(resourcesDirectory.exists() && resourcesDirectory.isDirectory()) { File[] files = resourcesDirectory.listFiles(); if(files != null) { for(File file : files) { } } } } }