title: Selecting a JLabel by knowing its Name
body: <p>If I have many JLabels on the screen and I know their names how would I go about selecting finding them?</p>
  
  <p>For example I know that I previously (dynamically) created a new JLabel with the name 2340. Is there something like</p>
  
  <pre><code>JLabel image = findJlabel ("2340");
  </code></pre>
  
  <p>In order to select the JLabel component?</p>
  
  <p>Thanks, 
  Neco</p>
  
  <p>EDIT: Just want to show how I am creating these JLabels</p>
  
  <pre><code>// Initially creates all the imagelabels
      public static void createImageLabels (){
          int xcord, ycord;
          JLabel image;
          String imageLabelName; 
  
          xcord = 0;
          ycord = yOffset;
          for (int row = 0 ; row &lt; map.length; row++) {
              xcord = 0;
              for (int  col = 0 ; col &lt; map[0].length; col++) {
                  imageLabelName = Integer.toString(row);
                  imageLabelName += Integer.toString(col);
                  image = new JLabel(new ImageIcon(space));
                  image.setName(imageLabelName);      
                  image.setLocation(xcord, ycord);
                  image.setSize(24, 24);
                  imagePanel.add(image);  
                  System.out.println ("Created a Jlabel Named "+imageLabelName);
                  xcord += 24;
              }
              ycord += 24;
          }
      }
  </code></pre>
  
  <p>I create a tile of imageIcons on the screen and then later on if I want to change the image displayed by them I want to select it and change it.</p>