网站大量收购独家精品文档,联系QQ:2885784924

java 职工信息管理系统源代码.docx

  1. 1、本文档共31页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多

源代码

packagelesson2;

importjava.sql.*;

publicclassemployee

{

public

String

num;

public

String

name;

public

String

sex;

public

String

age;

public

String

edu;

public

String

sla;

public

String

add;

public

String

tel;

publicvoidinit(Stringx1,Stringx2,Stringx3,Stringx4,Stringx5,Stringx6,Stringx7,Stringx8)

{

num=x1;name=x2;sex=x3;age=x4;edu=x5;sla=x6;add=x7;tel=x8;

}

publicvoidload(Stringf)

{

try

{

Class.forName(com.microsoft.sqlserver.jdbc.SQLServerDriver);

Stringurl=jdbc:sqlserver://localhost:1433;DatabaseName=employee;

StringuserName=sa;Stringpassword=xhw;

Connectionconn=DriverManager.getConnection(url,userName,password);

if(conn!=null)

立连接!);

}

System.out.println(已成功地与SQLServer2005数据库建

Statementstmt=conn.createStatement();stmt.executeUpdate(f);

stmt.close();

catch(Exceptione)

{

e.printStackTrace();

}

}

}

packagelesson2;importjava.awt.*;

importjava.awt.event.*;importjava.sql.*;

publicclasslesson2_1

{

staticFramef;CardLayoutmyCard;

Panel

p1;

Panel

p2;

Panel

p3;

Panel

p4;

Panel

p5;

Panel

p6;

Panel

p7;

Panel

p8;

publicstaticvoidmain(String[]args)

{

lesson2_1test=newlesson2_1();test.go1();

test.go2();

test.go3();

test.go4();

test.go5();

test.go6();

test.go7();

test.go8();

}

publicvoidgo1()

{

f=newFrame(呵 呵);myCard=newCardLayout();f.setLayout(myCard);

p1=newPanel();Buttonb1,b2,b3;LabelL1;TextFieldte1;

finalTextFieldte2;

p1.setLayout(newGridBagLayout());GridBagConstraintsc=newGridBagConstraints();

Panelp1_1=newPanel();p1_1.setLayout(newGridBagLayout());

GridBagConstraintsx=newGridBagConstraints();

b1=newButton(请 输 入 用 户 名);b1.setBackground(Color.CYAN);x.insets=newInsets(50,50,50,50);x.gridx=0;

x.gridy=0;x.gridwidth=1;x.gridheight=1;p1_1.add(b1,x);

b2=newButton(请 输 入 密 码);b2.setBackground(Color.CYAN);

x.gridx=0;x.gridy=5;x.gridwidth=1;x.gridheight=1;p1_1.add(b2,x);

te1=newTextField(15);c.insets=newInsets(40,0,40,0);x.gridx=5;

x.gridy=0;x.gridwidth=1;x.gridheight=1;p1_1.a

您可能关注的文档

文档评论(0)

hao187 + 关注
官方认证
内容提供者

该用户很懒,什么也没介绍

认证主体武汉豪锦宏商务信息咨询服务有限公司
IP属地上海
统一社会信用代码/组织机构代码
91420100MA4F3KHG8Q

1亿VIP精品文档

相关文档