I ma creating a Project on Java Uaing editor NetBeans 6.0
In this project, i want to put Dynemic image on JLabel which gets the Image Path from Database. It works Properly BUT....
The size of JLabel autometicaly adjust:(
If the Image size is 1024x672 then JLabel covers whole Swing JInnerFrame.
How to fix this problem.how to stretch the image to fit in the size of JLabel.
Code for Image is as Follows
int i = jTable1.getSelectedRow();
rstmp.absolute(i+1);
ImageIcon img = new ImageIcon(rstmp.getString("photo"));
LblPhoto.setIcon(img);
here,
rstmp = Recordset contain the records data
LblPhoto = JLabel which displays the Image
please give me sample code so i can Fix it.