title: Maven path to resources
body: <p>I am ending my project and I want to add some photos as Icons.
  This project is in Maven.</p>
  <p>I just dont know how to get path correctly. I tried all possible paths.</p>
  <p><img src="https://i.stack.imgur.com/B7fq2.png" alt="enter image description here" /></p>
  <pre><code>        JLabel fLabel = new JLabel(&quot;Text&quot;);
          fLabel.setBounds(375,5,50,50);
          ImageIcon icon = new ImageIcon(&quot;.//resources/flag.png&quot;);
  
          fLabel.setIcon(icon);
  
  
          this.add(fLabel);
  </code></pre>