Java - Retrieving Images from MySQL DB
<p>I face a problem when i try to retrieve images from database.</p>

<pre><code>          String sql = "select image from alumni_user where ID="+14;
          ResultSet rs1 = stmt.executeQuery(sql);
          while(rs1.next())
          {
              byte[] imagedata = rs1.getBytes("image") ;
              Image img = Toolkit.getDefaultToolkit().createImage(imagedata);
              ImageIcon icon =new ImageIcon(img);
              JLabel lPhoto = new JLabel(icon) ;
              this.add(lPhoto) ;

          }
</code></pre>

<p>All i do is this.What's wrong with that ? </p>
