java編寫網絡賬號管理系統(tǒng)源碼

上傳人:1777****777 文檔編號:39991536 上傳時間:2021-11-13 格式:DOC 頁數:74 大小:1.01MB
收藏 版權申訴 舉報 下載
java編寫網絡賬號管理系統(tǒng)源碼_第1頁
第1頁 / 共74頁
java編寫網絡賬號管理系統(tǒng)源碼_第2頁
第2頁 / 共74頁
java編寫網絡賬號管理系統(tǒng)源碼_第3頁
第3頁 / 共74頁

下載文檔到電腦,查找使用更方便

0 積分

下載資源

還剩頁未讀,繼續(xù)閱讀

資源描述:

《java編寫網絡賬號管理系統(tǒng)源碼》由會員分享,可在線閱讀,更多相關《java編寫網絡賬號管理系統(tǒng)源碼(74頁珍藏版)》請在裝配圖網上搜索。

1、網絡賬號管理系統(tǒng) 數據庫名稱:T_user,T_source T_user:T_source:界面設計用戶登錄界面:登錄后顯示界面:修改密碼界面:按網站查詢界面:按賬號查詢界面:修改界面:添加賬號界面:賬號添加成功:刪除界面:源碼:package com.GUI.zzx;import java.awt.Toolkit;import java.awt.Dimension;import javax.swing.*;/窗體居中類public class WindowsCenter public WindowsCenter() SuppressWarnings(deprecation)public s

2、tatic void Center(JFrame frame) Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); Dimension frameSize = frame.getSize(); if (frameSize.height screenSize.height) frameSize.height = screenSize.height; if (frameSize.width screenSize.width) frameSize.width = screenSize.width; frame.set

3、Location(screenSize.width - frameSize.width) / 2, (screenSize.height - frameSize.height) / 2); frame.show(); package com.GUI.zzx;import h2.alterpass;import java.awt.Color;import java.awt.Font;import java.awt.Graphics;import java.awt.Image;import javax.swing.JFrame;import javax.swing.JPanel;import ja

4、va.awt.BorderLayout;import javax.swing.BoxLayout;import javax.swing.JButton;import java.awt.event.ActionListener;import java.awt.event.ActionEvent;import java.awt.CardLayout;import javax.swing.JSplitPane;import javax.swing.BorderFactory;import javax.swing.Box;import javax.swing.ImageIcon;import java

5、x.swing.JLabel;import javax.swing.JOptionPane;import javax.swing.JTable;import javax.swing.JTextField;import javax.swing.JPasswordField;import javax.swing.SwingConstants;import javax.swing.JScrollPane;import User.*;import h2.AddResource;SuppressWarnings(serial)public class Window extends JFrame priv

6、ate JPanel panelMain ,panelFirst ,panelAdd;private JButton btnMain,btnNet,btnAccount,btnAdd,btnExit;private CardLayout card,card1 ,card2;private JLabel lbChange;private JTable table1;private JTable table2;private JTextField textField;private static String usertemp=;/* * Create the application. */pub

7、lic Window() initWin();initListener();/* * InitiWin the contents of the frame. */=我是華麗的分割線()喵=首頁=/panelFirst = new JPanel();card1 = new CardLayout();panelFirst.setLayout(card1);final JPanel Login = new JPanel()Override protected void paintComponent(Graphics g) ImageIcon icon = new ImageIcon(this.get

8、Class().getResource(res/test.jpg);Image img = icon.getImage(); g.drawImage(img, 0, 0, icon.getIconWidth(), icon.getIconHeight(), icon.getImageObserver(); ;final JPanel Register = new JPanel()Override protected void paintComponent(Graphics g) ImageIcon icon = new ImageIcon(this.getClass().getResource

9、(res/test.jpg);Image img = icon.getImage(); g.drawImage(img, 0, 0, icon.getIconWidth(), icon.getIconHeight(), icon.getImageObserver(); ;final JPanel pl3 = new JPanel();card2 = new CardLayout();/登陸頁/Box hbox1 = Box.createHorizontalBox();Box hbox2 = Box.createHorizontalBox();Box hbox3 = Box.createHori

10、zontalBox();Box hbox4 = Box.createHorizontalBox();Box vbox1= Box.createVerticalBox();JLabel lbLogin = new JLabel(用戶登錄);lbLogin.setFont(new Font(楷體, Font.BOLD, 18);lbLogin.setForeground(Color.red);JLabel lbUser= new JLabel(用戶名);lbUser.setFont(new Font(楷體, Font.BOLD, 14);JLabel lbPwd = new JLabel(密 碼)

11、;lbPwd.setFont(new Font(楷體, Font.BOLD, 14);final JTextField textUser = new JTextField(20);final JPasswordField textPwd = new JPasswordField(20);JButton btnLogin = new JButton(登錄);btnLogin.setFont(new Font(楷體, Font.BOLD, 14);btnLogin.addActionListener(new ActionListener() Overridepublic void actionPe

12、rformed(ActionEvent arg0) / TODO Auto-generated method stub/獲得輸入的用戶名和密碼String username = textUser.getText();char pass = textPwd.getPassword();StringBuffer sb = new StringBuffer();for (int i = 0; i pass.length; i+) sb.append(passi);String password = sb.toString();/判斷登陸login log = new login();if(log.l

13、og(username, password)usertemp = username;card1.show(panelFirst, 3);textField.setText(usertemp);btnNet.setEnabled(true);btnAccount.setEnabled(true);btnAdd.setEnabled(true);btnExit.setEnabled(true););JButton btnReg = new JButton(注冊);btnReg.setFont(new Font(楷體, Font.BOLD, 14);btnReg.addActionListener(

14、new ActionListener() Overridepublic void actionPerformed(ActionEvent e) / TODO Auto-generated method stubcard1.show(panelFirst, 2););hbox1.add(lbLogin);hbox2.add(lbUser);hbox2.add(textUser);hbox3.add(lbPwd);hbox3.add(textPwd);hbox4.add(btnLogin);hbox4.add(Box.createHorizontalStrut(20);hbox4.add(btnR

15、eg);vbox1.add(Box.createVerticalStrut(30);vbox1.add(hbox1);vbox1.add(Box.createVerticalStrut(20);vbox1.add(hbox2);vbox1.add(Box.createVerticalStrut(20);vbox1.add(hbox3);vbox1.add(Box.createVerticalStrut(20);vbox1.add(hbox4);vbox1.add(Box.createVerticalStrut(30);Login.add(vbox1);final JPanel pr3= new

16、 JPanel(card2);JSplitPane Setting = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,pl3,pr3);pl3.setLayout(null);JLabel label = new JLabel(用戶名);label.setFont(new Font(楷體, Font.BOLD, 12);label.setBounds(5, 50, 50, 25);pl3.add(label);textField = new JTextField(usertemp);textField.setEditable(false);textFie

17、ld.setBounds(45, 50, 100, 25);pl3.add(textField);JLabel label_2 = new JLabel(當前用戶);label_2.setFont(new Font(楷體, Font.BOLD, 14);label_2.setBounds(40, 10, 70, 30);pl3.add(label_2);JButton button_1 = new JButton(修改密碼);button_1.setFont(new Font(楷體, Font.BOLD, 10);button_1.setBounds(65, 90, 80, 25);butto

18、n_1.addActionListener(new ActionListener() Overridepublic void actionPerformed(ActionEvent e) / TODO Auto-generated method stubcard2.show(pr3, 1););pl3.add(button_1);Setting.setDividerLocation(150);Setting.setDividerSize(1);Setting.setResizeWeight(1);/注冊頁面/Box hbox10 = Box.createHorizontalBox();Box

19、hbox20 = Box.createHorizontalBox();Box hbox30 = Box.createHorizontalBox();Box hbox40= Box.createHorizontalBox();Box hbox50= Box.createHorizontalBox();Box vbox20= Box.createVerticalBox();JLabel lbRegister = new JLabel(用戶注冊);lbRegister.setFont(new Font(楷體, Font.BOLD, 18);/lbRegister.setForeground(new

20、Color(180,50,200);lbRegister.setForeground(Color.red);JLabel lbReUser= new JLabel(用 戶 名);lbReUser.setFont(new Font(楷體, Font.BOLD, 14);JLabel lbRePwd = new JLabel(密 碼);lbRePwd.setFont(new Font(楷體, Font.BOLD, 14);JLabel lbRe_Pwd = new JLabel(確認密碼);lbRe_Pwd.setFont(new Font(楷體, Font.BOLD, 14);final JTe

21、xtField textReUser = new JTextField(20);final JPasswordField textRePwd = new JPasswordField(20);final JPasswordField textRe_Pwd = new JPasswordField(20);JButton btnRe = new JButton(確定);btnRe.setFont(new Font(楷體, Font.BOLD, 14);btnRe.addActionListener(new ActionListener() Overridepublic void actionPe

22、rformed(ActionEvent arg0) / TODO Auto-generated method stub/獲得輸入的信息String username = textReUser.getText();char pass = textRePwd.getPassword();char repass = textRe_Pwd.getPassword();StringBuffer sb = new StringBuffer();for (int i = 0; i pass.length; i+) sb.append(passi);String password = sb.toString(

23、);StringBuffer sb1 = new StringBuffer();for (int i = 0; i )喵=個人主頁/=JPanel jp0 = new JPanel()Override protected void paintComponent(Graphics g) ImageIcon icon = new ImageIcon(this.getClass().getResource(res/test.jpg);Image img = icon.getImage(); g.drawImage(img, 0, 0, icon.getIconWidth(), icon.getIco

24、nHeight(), icon.getImageObserver(); ;/修改密碼/JPanel jp1 = new JPanel();Box hbox12 = Box.createHorizontalBox();Box hbox22 = Box.createHorizontalBox();Box hbox32 = Box.createHorizontalBox();Box hbox42= Box.createHorizontalBox();Box hbox52= Box.createHorizontalBox();Box vbox2= Box.createVerticalBox();lbC

25、hange = new JLabel(修改密碼);lbChange.setFont(new Font(楷體, Font.BOLD, 18);lbChange.setForeground(Color.red);JLabel lbOldPwd= new JLabel(舊 密 碼);lbOldPwd.setFont(new Font(楷體, Font.BOLD, 14);JLabel lbNewPwd = new JLabel(新 密 碼);lbNewPwd.setFont(new Font(楷體, Font.BOLD, 14);JLabel lbReNewPwd = new JLabel(確認密碼

26、);lbReNewPwd.setFont(new Font(楷體, Font.BOLD, 14);final JPasswordField textOldPwd = new JPasswordField(20);final JPasswordField textNewPwd = new JPasswordField(20);final JPasswordField textReNewPwd = new JPasswordField(20);JButton btnOk = new JButton(確定);btnOk.setFont(new Font(楷體, Font.BOLD, 14);btnO

27、k.addActionListener(new ActionListener() Overridepublic void actionPerformed(ActionEvent arg0) /修改已有用戶的密碼/查看兩次密碼是否一致char oldpwd=textOldPwd.getPassword();StringBuffer sb1=new StringBuffer();for (int i = 0; i oldpwd.length; i+) sb1.append(oldpwdi);String oldString=sb1.toString();char newpwd=textNewPwd

28、.getPassword();StringBuffer sb2=new StringBuffer();for (int i = 0; i newpwd.length; i+) sb2.append(newpwdi);String newString=sb2.toString();char renewpwd=textReNewPwd.getPassword();StringBuffer sb3=new StringBuffer();for (int i = 0; i )喵=按賬號查詢=/JPanel pl2 = new JPanel();JPanel pr2 = new JPanel();pl2

29、.setLayout(new BorderLayout(0, 0);pr2.setLayout(null);JPanel pl21 = new JPanel();pl2.add(pl21, BorderLayout.NORTH);JPanel plMAD1 = new JPanel();pl2.add(plMAD1, BorderLayout.SOUTH);JButton btModify1 = new JButton(修改);btModify1.setFont(new Font(楷體, Font.BOLD, 14);JButton btDelete1 = new JButton(刪除);bt

30、Delete1.setFont(new Font(楷體, Font.BOLD, 14);plMAD1.add(btModify1);plMAD1.add(btDelete1);JSplitPane panelAccount = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,pl2,pr2);panelAccount.setOpaque(false);pl21.setLayout(new BoxLayout(pl21, BoxLayout.X_AXIS);JLabel lbAccount = new JLabel(賬 號);lbAccount.setFont(new Font(楷體, Font.BOLD, 14);pl21.add(lbAccount);

展開閱讀全文
溫馨提示:
1: 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
2: 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
3.本站RAR壓縮包中若帶圖紙,網頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
4. 未經權益所有人同意不得將文件中的內容挪作商業(yè)或盈利用途。
5. 裝配圖網僅提供信息存儲空間,僅對用戶上傳內容的表現方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
6. 下載文件中如有侵權或不適當內容,請與我們聯(lián)系,我們立即糾正。
7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

相關資源

更多
正為您匹配相似的精品文檔
關于我們 - 網站聲明 - 網站地圖 - 資源地圖 - 友情鏈接 - 網站客服 - 聯(lián)系我們

copyright@ 2023-2025  zhuangpeitu.com 裝配圖網版權所有   聯(lián)系電話:18123376007

備案號:ICP2024067431-1 川公網安備51140202000466號


本站為文檔C2C交易模式,即用戶上傳的文檔直接被用戶下載,本站只是中間服務平臺,本站所有文檔下載所得的收益歸上傳人(含作者)所有。裝配圖網僅提供信息存儲空間,僅對用戶上傳內容的表現方式做保護處理,對上載內容本身不做任何修改或編輯。若文檔所含內容侵犯了您的版權或隱私,請立即通知裝配圖網,我們立即給予刪除!