title: MySQL blob to Netbeans JLabel
body: <p>I have a blob type field in my MySQL, I want to put the data in this field in <code>JLabel</code> as Icon. For example this <code>JLabel</code> will be user's Profile Picture in my form.</p>
  
  <p>I used this codes but nothing happens
  and also I want to <code>fix to width</code> or fix any image size in my jlabel</p>
  
  <pre><code>DefaultTableModel pic = MyDB.DataTable("SELECT `Picture` FROM `photo` WHERE `Employee ID` = 'EQ0103'");
       if (pic.getRowCount() &gt; 0){
           Blob blob = pic.getBlob(1);
           byte[] image1 = blob.getBytes(1, ALLBITS);
           ImageIcon image = new ImageIcon(image1);
           picture.setIcon(image);
           getContentPane().add(picture);
           setVisible(true);
       }
  </code></pre>
  
  <p><code>picture</code> is the name of my jlabel</p>