求救!!!
请各位帮忙解决一下~我的这代码是用窗体显示图片```可图片出不来~是什么原因呢?/**
* @(#)tt.java
*
*
* @author
* @version 1.00 2008/4/6
*/
import java.awt.*;
import java.awt.event.*;
import java.awt.image.*;
public class tt extends Frame {
/**
* Creates a new instance of <code>tt</code>.
*/
Image img;
public tt() {
this.setLayout(new FlowLayout());
this.setSize(720,480);
this.addWindowListener(new a());
//this.show();
this.setVisible(true);
}
public void Paint(Graphics g)
{
Toolkit tk=Toolkit.getDefaultToolkit();
Image img=tk.getImage("1.jpg");
g.drawImage(img,0,20,this);
}
public void update(Graphics g)
{
this.Paint(g);
}
public void repaint(Graphics g)
{
this.Paint(g);
}
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
new tt();
}
}
class a extends WindowAdapter
{
public void windowClosing(WindowEvent e)
{
System.exit(1);
}
}