title: export images with jar file using intellij
body: <p>I've looked and tried several ways how to do this and I just can't seem to get it right. The program runs fine. After using intellij to export into a jar file (using this video - <a href="https://www.youtube.com/watch?v=3Xo6zSBgdgk" rel="nofollow noreferrer">https://www.youtube.com/watch?v=3Xo6zSBgdgk</a>), I get the following error when running the jar file...</p>
  
  <p><a href="https://i.stack.imgur.com/kDrqX.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kDrqX.png" alt="enter image description here"></a></p>
  
  <p>These lines are as follows...</p>
  
  <p><strong>line#44:</strong><code>setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource(guiImgIconLocName)));</code> with String variable <code>guiImgIconLocName</code> = <code>"..\\images\\TitleBarIcon.png"</code></p>
  
  <p>and</p>
  
  <p><strong>line#6134:</strong><code>new StartGui();</code> as part of the <code>public static void main(String[] args)</code> method</p>
  
  <p>This is my constructor snippet:</p>
  
  <pre><code>StartGui() {
      /*
       * Display everything in GUI to user
       */
      int mainWindowSizeWidth = 800;
      int mainWindowSizeHeight = 600;
  
      setContentPane(backgroundFrame);
      setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource(guiImgIconLocName)));
      setTitle("Final Fantasy 7 Level Up Calculator");
      add(topFrameScroll, BorderLayout.NORTH);
      add(centerFrameScroll, BorderLayout.CENTER);
      addComponentListener(new ComponentAdapter() {
          @Override
          public void componentResized(ComponentEvent e) {
              SwingUtilities.invokeLater(new Runnable() {
  
                  @Override
                  public void run() {
                      revalidate();
                      repaint();
                  }
              });
          }
      });
  
      setSize(mainWindowSizeWidth,mainWindowSizeHeight);
      setVisible(true);
      setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  }
  </code></pre>
  
  <p>When creating the artifacts, I'm guessing there is a step to include the images (I'm not an expert and this is my first swing project)...
  <a href="https://i.stack.imgur.com/shPij.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/shPij.png" alt="enter image description here"></a></p>
  
  <p>Can anyone tell me what I'm missing?</p>