public class text2 extends Frame{
Image img = GameUtil.getImage("images/fly.jpg");
public void launchFrame(){
setSize(500,300);
setLocation(0,0);
setVisible(true);
addWindowListener(new WindowAdapter(){
public void windowClosing(WindowEvent e){
System.exit(0);
}//点关闭可以关闭窗口
});
}
public void paint(Graphics g){
Color c = g.getColor();
g.setColor(Color.blue);
g.drawOval(100, 100, 100, 100);
g.drawImage(img, 200, 200, null);
}
public static void main(String args[]){
text2 t1 = new text2();
t1.launchFrame();
}
}
报错跳转为
public static BufferedImage read(URL input) throws IOException {
if (input == null) {
throw new IllegalArgumentException("input == null!");
}