Home > Back-end >  Icons not visible after compilation
Icons not visible after compilation

Time:06-28

ok i am a new one here and tried to write an awesome program:

package f;

import javax.swing.*;

public class dasMain {
    public static void main(String[] args) {
        ImageIcon img = new ImageIcon("pics/daFaq.png");
        JOptionPane.showMessageDialog(null, img, "u r heck", JOptionPane.PLAIN_MESSAGE);
    }
}

the thing is that if I run the program from Intellij Idea, then everything works fine, but after compilation the picture disappears

here are the source files of the project: enter image description here

P. S. I would advise to use Maven or Gradle build system for managing project builds. As it is commonly accepted build management systems for the JVM projects. IDE New Project Wizard has the option to create Maven or Gradle based projects.

  • Related