源代码
package lesson2;
import .*;
public class employee
{
public String num;
public String name;
public String sex;
public String age;
public String edu;
public String sla;
public String add;
public String tel;
public void init(String x1,String x2,String x3,String x4,String x5,String x6,String x7,String x8)
{
num=x1;
name=x2;
sex=x3;
age=x4;
edu=x5;
sla=x6;
add=x7;
tel=x8;
}
public void load(String f)
{
try
{
("");
String url="jdbc:sqlserver://localhost:1433;DatabaseName=employee";
String userName="sa";
String password="xhw";
Connection conn=(url,userName,password);
if(conn!=null)
("已成功地与SQL Server 2005数据库建立连接!");
Statement stmt=();
(f);
();
}
catch(Exception e)
{
();
}
}
}
package lesson2;
import .*;
import .*;
import .*;
public class lesson2_1
{
static Frame f;
CardLayout myCard;
Panel p1;
Panel p2;
Panel p3;
Panel p4;
Panel p5;
Panel p6;
Panel p7;
Panel p8;
public static void main(String[] args)
{
lesson2_1 test=new lesson2_1();
();
();
();
();
();
();
();
();
}
public void go1()
{
f=new Frame("呵呵!!!");
myCard=new CardLayout();
(myCard);
p1=new Panel();
Button b1,b2,b3;
Label L1;
TextField te1;
final TextField te2;
(new GridBagLayout());
GridBagConstraints c=new GridBagConstraints();
Panel p1_1=new Panel();
(new GridBagLayout());
GridBagConstraints x=new GridBagConstraints();
b1=new Button(" 请输入用户名");
();
=new Insets(50,50,50,50);
=0;
=0;
=1;
=1;
(b1,x);
b2
java 职工信息管理系统源代码 来自淘豆网m.daumloan.com转载请标明出处.