import java.sql.*;
import java.awt.*;
import java.awt.event.*;
public class bb1 {
public static void main(String args[]) {
ccc x=new ccc();
x.fun();
}
}
class ccc {
String zuozhe;
Frame obj=new Frame("第一个自己定义的窗体");
Panel p1=new Panel();
Panel p2=new Panel();
CheckboxGroup cg1=new CheckboxGroup();
Label l1=new Label("学号");
Label l2=new Label("系别");
Label l3=new Label("专业");
Label l4=new Label("姓名");
Label l5=new Label("性别");
TextField t1=new TextField();
TextField t2=new TextField();
TextField t3=new TextField();
TextField t4=new TextField();
TextField t5=new TextField();
List cc1=new List();
Button b1=new Button("frame1");
public void fun(){
obj.setSize(450,350);
obj.add(p1,"North");
obj.add(p2,"Center");
p2.setLayout(null);
Button b2=new Button("删除");
p1.add(b2);
Button b3=new Button("添加");
p1.add(b3);
Button b4=new Button("更新");
p1.add(b4);
b4.addActionListener(new ax());
b3.addActionListener(new ay());
b2.addActionListener(new az());
l1.setBounds(120,30,50,30);
p2.add(l1);
l2.setBounds(120,60,50,30);
p2.add(l2);
l3.setBounds(120,90,50,30);
p2.add(l3);
l4.setBounds(120,120,50,30);
p2.add(l4);
l5.setBounds(120,150,50,30);
p2.add(l5);
t1.setBounds(190,30,50,30);
t2.setBounds(190,60,50,30);
t3.setBounds(190,90,50,30);
t4.setBounds(190,120,50,30);
t5.setBounds(190,150,50,30);
p2.add(t1);
p2.add(t2);
p2.add(t3);
p2.add(t4);
p2.add(t5);
cc1.setBounds(10,10,50,150);
java程序设计和数据库的连接