title: Store image to Array
body: <p>Before adding image to <code>JLabel</code>, I used below code to resize them.</p>
  
  <pre><code>BufferedImage myPicture1 = ImageIO.read(new
  File("C:\\Users\\yumi\\Desktop\\Salad.png"));
  Image scaled1 = myPicture1.getScaledInstance(80,95,Image.SCALE_SMOOTH); 
  JLabel picLabel1 = new JLabel("Japanese Noodles",new 
  ImageIcon(scaled1),JLabel.CENTER);
  panel.add(picLabel1);
  </code></pre>
  
  <p>Now I have array, want to store image to array</p>
  
  <pre><code>static private JLabel[] foodLabel;
  static private JTextField[] qtyField;
  static private ImageIcon[] imageIcon;
  static private Image[] imageScaled;
  static private BufferedImage[] image;
  static private File[] file;
  private static final int ELEMENTS = 9;
  </code></pre>
  
  <p>Trying to read file and scale it</p>
  
  <pre><code>file[0] = new File("C:\\Users\\yumi\\Desktop\\Salad.png");
           .....
  
  for (int i = 0; i &lt; ELEMENTS; i++) {
          image[i] = ImageIO.read(file[i]);
          imageScaled[i] = image[i].getScaledInstance(80,95,Image.SCALE_SMOOTH);
          foodLabel[i] = new JLabel(imageIcon([imageScaled[i]])); // error
  }
  </code></pre>
  
  <p><strong>Error</strong></p>
  
  <blockquote>
    <p>Exception in thread "AWT-EventQueue-0" java.lang.Error: Unresolved compilation problem: 
        Syntax error on token "(", Expression expected after this token</p>
  </blockquote>