帮忙看看这个程序怎么了?解决立即给分~~~~~~
源程序在这,下面是错误~~~
import java.awt.*;
import java.awt.event.*;
import java.sql.*;
public class jdbc
{
public static void main(String arg[])
{
GUI gui=new GUI();
gui.pack();
}
}
class GUI extends Frame implements ActionListener
{
TextArea text;
Panel panel;
TextField sno;
Button btn;
GUI()
{
super("物资情况查询");
setLayout(new BorderLayout());
setBackground(Color.cyan);
setVisible(true);
text=new TextArea();
btn=new Button("查询");
sno=new TextField(16);
panel=new Panel();
panel.add(new Label("输入被查询的物资编号:"));
panel.add(sno);panel.add(btn);
add("north",panel);
add(text,"Center");
text.setEditable(false);
btn.addActionListener(this);
addWindowListener(new WindowAdapter()
{
public void windowClosing(WindowEvent e)
{
setVisible(false);
System.exit(0);
}
});
}
public void actionPerfomed(ActionEvent e){
if(e.getSource()==btn)
{
text.setText("查询结果"+'\n');
try
{
Liststudent();
}
catch(Exception ee){}
}
}
public void Liststudent()throws Exception
{
String bh,mc,xh,lb,dw,sj;
int sl;float dj,je;
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
}
catch(ClassNotFoundException e){}
Connection con=DriverManager.getConnection("jdbc:odbc:wzgl");
Statement sql=con.createStatement();
ResultSet rs=sql.executeQuery("select * from wuzi");
while(rs.next())
{
bh=rs.getString("物资编号");
mc=rs.getString("物资名称");
xh=rs.getString("规格型号");
lb=rs.getString("类别");
dw=rs.getString("计量单位");
sl=rs.getInt("数量");
je=rs.getFloat("金额");
sj=rs.getDate("时间").toString();
if(bh.trim().equals(sno.getText().trim()))
{
text.append('\n'+"物资编号"+" "+"物资名称"+" "+"规格型号"+" "+"类别"+" "+"计量单位"+" "+"数量"+" "+"单价"+" "+"金额"+" "+"时间"+'\n');
text.append('\n'+bh+" "+mc+" "+xh+" "+lb+" "+dw+" "+sl+" "+dj+" "+je+" "+sj+" "+'\n');
}
}
}
}
D:\javaprogram>javac jdbc.java
jdbc.java:12: GUI should be declared abstract; it does not define actionPerforme
d(java.awt.event.ActionEvent) in GUI
class GUI extends Frame implements ActionListener
^
1 error