import java.awt.Frame;
import java.awt.Graphics;
import java.awt.Image;
import java.awt.Toolkit;
public class Img extends Frame{
private Image img;
public Img() {
String title = "dragon.jpg";
img = Toolkit.getDefaultToolkit().getImage(title);
setVisible(true);
}
@Override
public void paint(Graphics g) {
g.drawImage(img, 0, 0, null);
}
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
new Img();
}
}