欢迎来到天天文库
浏览记录
ID:47462864
大小:117.51 KB
页数:15页
时间:2020-01-11
《电信IP资费管理系统4-8》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、电信IP资费管理系统代码重庆文理学院java课4管理员列表importjava.awt.*;importjava.awt.event.*;importjavax.swing.*;importjava.sql.*;publicclass管理员列表extendsJPanelimplementsActionListener{privateJButtonbutton[]=newJButton[3];privateJTabletable1;public管理员列表(){JPanelp1=newJPanel(newBorde
2、rLayout());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:o
3、dbc:电信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];
4、for(inti=0;i5、={"帐号","姓名","电话","邮箱","开户日期","权限"};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(SQLExcept6、ionse){System.out.println("SQLEception"+se.getMessage());}JPanelp3=newJPanel(newFlowLayout());p1.add(p3,"South");Strings2[]={"删除","修改","清除"};for(inti=0;i7、.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.*;impo8、rtjava.sql.*;publicclass开通账户extendsJPanelimplementsActionListener,ItemListener{privateJButton提交,重设;privateJTextField账务账号,账务密码,重复密码,用户名称,性别选项,用户状态,电子邮箱,联系电话,公司,公司邮箱,邮政编码;privateJRadioButton男,女,开通
5、={"帐号","姓名","电话","邮箱","开户日期","权限"};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(SQLExcept
6、ionse){System.out.println("SQLEception"+se.getMessage());}JPanelp3=newJPanel(newFlowLayout());p1.add(p3,"South");Strings2[]={"删除","修改","清除"};for(inti=0;i7、.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.*;impo8、rtjava.sql.*;publicclass开通账户extendsJPanelimplementsActionListener,ItemListener{privateJButton提交,重设;privateJTextField账务账号,账务密码,重复密码,用户名称,性别选项,用户状态,电子邮箱,联系电话,公司,公司邮箱,邮政编码;privateJRadioButton男,女,开通
7、.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.*;impo
8、rtjava.sql.*;publicclass开通账户extendsJPanelimplementsActionListener,ItemListener{privateJButton提交,重设;privateJTextField账务账号,账务密码,重复密码,用户名称,性别选项,用户状态,电子邮箱,联系电话,公司,公司邮箱,邮政编码;privateJRadioButton男,女,开通
此文档下载收益归作者所有