title: how to display image retrieved from mysql on JFrame
body: <p>I am facing a problem in displaying image that retrieved from database on JFrame. Here is the that i will use,
        .........</p>
  
  <pre><code>     try
                 {
                 Class.forName("com.mysql.jdbc.Driver");
              Connection con=DriverManager.getConnection("jdbc:mysql://localhost:3306/studio","root","");  
              Statement st=con.createStatement();   
              ResultSet rs = st.executeQuery( "select  image  from photo_instn where cust_id='2'") ;
              while(rs.next()) 
              {
              byte[] imagedata = rs.getBytes("image") ;
              Image img = Toolkit.getDefaultToolkit().createImage(imagedata);
              ImageIcon icon =new ImageIcon(img);
              JLabel lPhoto = new JLabel(icon) ;
              setLayout(null);                              // BYTES TO IMAGE                                                                      
              System.out.println("Inside");
              System.out.println(lPhoto);
              this.add(lPhoto) ;
              lPhoto.setBounds(200,20,300,400); 
    }
  }
  </code></pre>
  
  <hr>
  
  <p>This code has no problem.but image not displayed on frame...
  Please help me for solving this problem....</p>