title: How can I draw multiple JLabels in different places? (icons don't show up)
body: <p>I am trying to draw multiple icons in many different locations using <code>for</code> loop. For some reason they just don't show up. I don't know what I'm missing – only clue I found was about setting layout to null, but IntelliJ overwrites it.
  Icons should show up in &quot;mapa&quot; panel. I tried adding them manually, but nothing changed.</p>
  <p>My code:</p>
  <pre class="lang-java prettyprint-override"><code>package okna;
  
  import logistyka.Walker;
  import logistyka.errand.Errand;
  
  import javax.swing.*;
  import java.awt.*;
  import java.awt.event.ActionEvent;
  import java.awt.event.ActionListener;
  import java.util.ArrayList;
  
  public class WalkerGUI extends JFrame{
      private JPanel mainPanel;
      private JLabel walkerName;
      private  JTextField walkerNameField;
      private JLabel walkerAddress;
      private  JTextField walkerAddressField;
      private JButton searchErrandsButton;
      private JComboBox errandsComboBox;
      private JLabel errandsList;
      private JTextField walletValue;
      private JLabel Wallet;
      private JRadioButton archivalErrandsRadioButton;
      private JRadioButton currentErrandsRadioButton;
      private JButton payOutButton;
      private JButton seeProfileButton;
      private JPanel mapa;
      ArrayList&lt;Errand&gt; masterErrandList = new ArrayList&lt;&gt;();
  
      public WalkerGUI(Walker w, ArrayList&lt;Errand&gt; masterErrandList)  {
          setContentPane(mainPanel);
          ArrayList&lt;JLabel&gt; errandsLabels = new ArrayList&lt;&gt;();
          ImageIcon x = new ImageIcon(System.getProperty(&quot;user.dir&quot;) + &quot;\\src\\x.png&quot;);
          this.masterErrandList = masterErrandList;
          for (Errand errand: masterErrandList) {
              JLabel label = new JLabel(&quot;whtvr&quot;);
              label.setIcon(x);
              label.setLocation((int)errand.getAddress().getX(),(int)errand.getAddress().getY());
              label.setMinimumSize(new Dimension(20,20));
              label.setPreferredSize(new Dimension(20,20));
              label.setVisible(true);
              errandsLabels.add(label);
          }
  
          walkerNameField.setText(w.getDescription().getName());
          walkerAddressField.setText(w.getDescription().getHomeRegion().getCurrentAddress().toString());
          walletValue.setText(String.valueOf(w.getWalletSatus()));
          seeProfileButton.addActionListener(new ActionListener() {
              @Override
              public void actionPerformed(ActionEvent e) {
                  JFrame frame = new ProfileGUI(w);
                  frame.pack();
                  frame.setVisible(true);
              }
          });
          payOutButton.addActionListener(new ActionListener() {
              @Override
              public void actionPerformed(ActionEvent e) {
                  w.setWalletSatus(0);
                  walletValue.setText(String.valueOf(w.getWalletSatus()));
              }
          });
      }
  
  
  }
  
  </code></pre>