I tring to do this since yesterday and i ve got no idea what is wrong. This is teh code:
<code>
import java.awt.*;
import java.awt.event.*;

public class proba extends Frame {
private Image image;

public proba(String fileName) {
Toolkit toolkit = Toolkit.getDefaultToolkit();
image = toolkit.getImage(fileName);
MediaTracker mediaTracker = new MediaTracker(this);
mediaTracker.addImage(image, 0);
try
{
mediaTracker.waitForID(0);
}
catch (InterruptedException ie)
{
System.err.println(ie);
System.exit(1);
}
addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
System.exit(0);
}
});
setSize(image.getWidth(null), image.getHeight(null));
setTitle(fileName);
show();
}

public void paint(Graphics graphics) {
graphics.drawImage(image, 0, 0, null);
}

public static void main(String[] args) {
new proba("res/scott.jpg");
}
}
</code>