Hello guys I have a problem in resizing the image in my java program here is the code:
import java.awt.*;
import java.applet.*;
public class sampleCaseStudy extends Applet {
private Image MyImage;
public void init() {
MyImage = getImage(getDocumentBase(), "manginasalmo.jpg");
MyImage.getScaledInstance(700, 100, Image.SCALE_DEFAULT);
}
public void paint(Graphics g) {
g.drawImage(MyImage, 0, 0, this);
}
}
the image displays but it doesnt change its size at all. Please help me with this