extends JFrame implements ActionListener {
//定义一些控件
JPane1 jp1,jp2;
JLabel jl1;
JButton jb1,jb2,jb3,jb4;
JTable jt;
JScrollpane jsp;
JTextField jtf;
StuModel sm;
ublic static void main(String[] args){
Text3 text=new Test3();}
public Test3 (){
jp1=new JPane1();
jtf=new JTextField(10);
jb1=new JButton("查询");
jb1.addactionListener(this);
jl1=new JLabel("请输入名字");
//把各个空间加入到jpl
jp1.add(jl1);
jp1.add(jtf);
jp1.add(jbl);
jp2=new JPane1 ();
jp2=new JButton("添加");
jb2.addActionListener( this);
jp3=new JButton("修改");
jb3.addActionListener( this); jp4=new JButton("删除");
jb2.addActionListener( this);
//把各个按钮加入到jp2
jp2.add(jb2); jp2.add(jb3); jp2.add(jb4);
//创建一个数据模型对象
sm=new StuModel(); String[] paras={"1"};
sm.queryStu("select * from stu where 1=?",paras);
//初始化JTable
jt=new JTable(sm)
//初始化jsp JScrollPane
jsp=new JScrollpane(jt);
//把jsp放入到jframe
this.add(jsp);
this.add(jp1,"Nort