Action Performed :
try{
int Click = jTable1.getSelectedRow();
Blob filenameBlob = (Blob) (jTable1.getValueAt(Click, 1));
byte[] content = filenameBlob.getBytes(1L,(int)filenameBlob.length());
if(jTable1.getValueAt(Click, 1) !=null){
ImageIcon image = new ImageIcon(content);
Image image1 = image.getImage().getScaledInstance(photo.getWidth(), photo.getHeight(), Image.SCALE_SMOOTH);
ImageIcon image2 = new ImageIcon(image1);
photo.setIcon(image2);
}
} catch (Exception e){
}
try{
int Click = jTable1.getSelectedRow();
Blob filenameBlob = (Blob) (jTable1.getValueAt(Click, 1));
byte[] content = filenameBlob.getBytes(1L,(int)filenameBlob.length());
if(jTable1.getValueAt(Click, 1) !=null){
ImageIcon image = new ImageIcon(content);
Image image1 = image.getImage().getScaledInstance(photo.getWidth(), photo.getHeight(), Image.SCALE_SMOOTH);
ImageIcon image2 = new ImageIcon(image1);
photo.setIcon(image2);
}
} catch (Exception e){
}
No comments:
Post a Comment