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

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

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

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