qq2013 java版(完整工程源码 包含服务端 oracle数据库)

这是公司的一位实习生分享的他自己的毕业设计,很不错哦。

  1. /**
  2.  * 初始化组件
  3.  */
  4. private void initComponent() {
  5.     //提示面板
  6.     errorTipPane = new ErrorTipPane();
  7.     // 主面板
  8.     mainPane = new MainPane();
  9.     // 底部登录按钮面板
  10.     downPane = new DownPane();
  11.     // 登陆头像及背景
  12.     lblLoginHeadimg = new JLabel(new ImageIcon(“image/Login/qqhead.png”));
  13.     lblLoginHeadbkg = new JLabel(new ImageIcon(
  14.             “image/Login/login_head_white.png”));
  15.     // 用户名文本框
  16.     jtfAccount = new JTextField(“100000”);
  17.     jtfAccount.setBorder(new LineBorder(Color.GRAY, 1));
  18.     jtfAccount.setFont(new Font(“Verdana”, Font.PLAIN, 12));
  19.     jtfAccount.setForeground(Color.black);
  20.     // 密码输入框
  21.     pwdfPassword = new JPasswordField(“1234567890  “);
  22.     pwdfPassword = new JPasswordField(“123”);
  23.     pwdfPassword.requestFocus(true);
  24.     pwdfPassword.setBorder(new LineBorder(Color.GRAY, 1));
  25.     pwdfPassword.setFont(font);
  26.     pwdfPassword.setForeground(Color.black);
  27.     pwdfPassword.setEchoChar(‘●’);
  28.     // 自动登陆复选框
  29.     chkAutoLogin = JButtonUtil.getIconCheckBox(
  30.             “image/Login/checkbox_normal.png”,
  31.             “image/Login/checkbox_hover.png”,
  32.             “image/Login/checkbox_press.png”,
  33.             “image/Login/checkbox_selected_hover.png”);
  34.     // 记住密码复选框
  35.     chkRememberPwd = JButtonUtil.getIconCheckBox(
  36.             “image/Login/checkbox_normal.png”,
  37.             “image/Login/checkbox_hover.png”,
  38.             “image/Login/checkbox_press.png”,
  39.             “image/Login/checkbox_selected_hover.png”);
  40.     // 自动登陆标签
  41.     lblAutoLogin = new JLabel(“自动登录”);
  42.     lblAutoLogin.setFont(font);
  43.     lblAutoLogin.setForeground(Color.black);
  44.     // 记住密码标签
  45.     lblRememberPwd = new JLabel(“记住密码”);
  46.     lblRememberPwd.setFont(font);
  47.     lblRememberPwd.setForeground(Color.black);
  48.     this.initStatus();
  49.     this.initButton();
  50.     this.initPupupMenu();
  51.     jtfAccount.addMouseListener(new MouseAdapter() {
  52.         @Override
  53.         public void mouseClicked(MouseEvent e) {
  54.             if(e.getClickCount()==1||e.getClickCount()==2){
  55.                 mainPane.remove(errorTipPane);
  56.                 mainPane.add(downPane);
  57.                 downPane.setBounds(0, 241, 380, 51);
  58.                 mainPane.updateUI();
  59.                 mainPane.validate();
  60.             }
  61.         }
  62.     });
  63.     pwdfPassword.addMouseListener(new MouseAdapter() {
  64.         @Override
  65.         public void mouseClicked(MouseEvent e) {
  66.             if(e.getClickCount()==1||e.getClickCount()==2){
  67.                 mainPane.remove(errorTipPane);
  68.                 mainPane.add(downPane);
  69.                 downPane.setBounds(0, 241, 380, 51);
  70.                 mainPane.updateUI();
  71.                 mainPane.validate();
  72.             }
  73.         }
  74.     });
  75. }

下载地址:http://yuncode.net/code/c_5204f5d84703a42

标签