Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questionJLabel label = new JLabel(new ImageIcon(getClass().getResource("images/splash1.JPG")));
JLabel label = new JLabel(new ImageIcon(getClass().getClassLoader().getResource("images/splash1.JPG")));
public BufferedImage getImage(final String filename) throws IOException { final BufferedImage image = ImageIO.read(getClass().getClassLoader().getResourceAsStream(filename)); return image; } //-------- JLabel label = new JLabel(new ImageIcon(getImage("images/splash1.JPG")));