预览加载中,请您耐心等待几秒...
1/10
2/10
3/10
4/10
5/10
6/10
7/10
8/10
9/10
10/10

亲,该文档总共26页,到这已经超出免费预览范围,如果喜欢就直接下载吧~

如果您无法下载资料,请参考说明:

1、部分资料下载需要金币,请确保您的账户上有足够的金币

2、已购买过的文档,再次下载不重复扣费

3、资料包下载后请先用软件解压,在使用对应软件打开

电信IP资费管理系统代码重庆文理学院java课4管理员列表importjava.awt.*;importjava.awt.event.*;importjavax.swing.*;importjava.sql.*;publicclass管理员列表extendsJPanelimplementsActionListener{privateJButtonbutton[]=newJButton[3];privateJTabletable1;public管理员列表(){JPanelp1=newJPanel(newBorderLayout());p1.add(newJLabel("管理员列表",JLabel.CENTER),"North");Connectioncon;ResultSetrs;Statementsql;try{Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");}catch(ClassNotFoundExceptionex){System.out.println("error:"+ex);}try{con=DriverManager.getConnection("jdbc:odbc:电信IP资费管理系统");sql=con.createStatement(1005,1007);rs=sql.executeQuery("select*fromuser");rs.last();intk=rs.getRow();if(k==0){JOptionPane.showMessageDialog(this,"您查询的表为空表!","系统提醒",JOptionPane.WARNING_MESSAGE);}rs.beforeFirst();Objectobj[][]=newObject[k][6];for(inti=0;i<k&&rs.next();i++){obj[i][0]=rs.getString("id");obj[i][1]=rs.getString("name");obj[i][2]=rs.getString("telephone");obj[i][3]=rs.getString("email");obj[i][4]=rs.getString("date");obj[i][5]=rs.getString("authority");}JPanelp2=newJPanel();Strings1[]={"帐号","姓名","电话","邮箱","开户日期","权限"};table1=newJTable(obj,s1);table1.setSize(500,500);JScrollPanejsp1=newJScrollPane(table1);jsp1.setPreferredSize(newDimension(table1.getWidth(),table1.getHeight()));p2.add(jsp1);p1.add(p2,"Center");con.close();}catch(SQLExceptionse){System.out.println("SQLEception"+se.getMessage());}JPanelp3=newJPanel(newFlowLayout());p1.add(p3,"South");Strings2[]={"删除","修改","清除"};for(inti=0;i<button.length;i++){button[i]=newJButton(s2[i]);p3.add(button[i]);button[i].addActionListener(this);}this.add(p1);this.setVisible(true);}publicvoidactionPerformed(ActionEvente){if(e.getActionCommand()=="修改"){this.setVisible(false);this.removeAll();this.add(new管理员管理());this.setVisible(true);}}}5开通账户importjava.awt.*;importjava.awt.event.*;importjavax.swing.*;importjava.sql.*;publicclass开通账户extendsJPanelimplementsActionListener,ItemListener{privateJButton提交,重设;privateJTextField账务账号,账务密码,反复密码,用户名称,性别选项,用户状态,电子邮箱,联系电话,公司,公司邮箱,邮政编码;privateJRadioButton男,女,开通