主题:[讨论]急救 谁能帮我解决以下我问题出在那里了啊????
谁能告诉我这是出了什么问题呀 怎么这么多错误啊
package 移动图片;
import javax.swing.*;
import java.awt.*;
import javax.swing.JFrame;
import java.awt.event.ActionEvent;
import java.awt.event.AdjustmentListener;
import java.net.*;
import java.awt.event.*;
public class test2 extends JFrame
{
JLabel jl;
static int x=0,y=100;
ImageIcon icon;
URL url;
Color c=new Color(255,255,255);
ActionListener taskPerformer=new ActionListener()
{
public void actionPerformed(ActionEvent evt)
{
x++;
jl.setLocation(x,y);
}
};
Timer ttl=new Timer(10,taskPerformer);
public test2()
{
try{url=Class.forName("test2").getResource("84.gif");}
catch(Exceptione)
{}
icon=new ImageIcon("84.gif");
jl.setBounds(300,300,150,200);
this.getContentPane().add(jl);
this.getContentPane().setLayout(null);
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
this.setBounds(100,100,500,300);
this.setVisible(true);
ttl.start();}
public static void main(String args[])
{
Test t=new test2();
}
}
package 移动图片;
import javax.swing.*;
import java.awt.*;
import javax.swing.JFrame;
import java.awt.event.ActionEvent;
import java.awt.event.AdjustmentListener;
import java.net.*;
import java.awt.event.*;
public class test2 extends JFrame
{
JLabel jl;
static int x=0,y=100;
ImageIcon icon;
URL url;
Color c=new Color(255,255,255);
ActionListener taskPerformer=new ActionListener()
{
public void actionPerformed(ActionEvent evt)
{
x++;
jl.setLocation(x,y);
}
};
Timer ttl=new Timer(10,taskPerformer);
public test2()
{
try{url=Class.forName("test2").getResource("84.gif");}
catch(Exceptione)
{}
icon=new ImageIcon("84.gif");
jl.setBounds(300,300,150,200);
this.getContentPane().add(jl);
this.getContentPane().setLayout(null);
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
this.setBounds(100,100,500,300);
this.setVisible(true);
ttl.start();}
public static void main(String args[])
{
Test t=new test2();
}
}