import java.sql.*;
import javax.swing.*;
import javax.swing.event.*;
import javax.swing.border.*;
import java.awt.*;
import java.awt.event.*;
import java.util.*;
import mypackage.*;
public class ChangeFrame1 extends JFrame
{
private Connection Insertconnection;
private Statement Insertstatement;
private ResultSet InsertresultSet;
//GUI变量定义
private JLabel NameLabel ;
private JLabel oldpasswordLabel ;
private JLabel passwordLabel ;
private JLabel repasswordLabel ;
private JLabel passlenLabel ;
private JLabel passnumLabel ;
private JTextField NameField;
private JPasswordField oldpasswordField;
private JPasswordField passwordField;
private JPasswordField repasswordField;
private JTextField passlenField;
private JTextField passnumField;
private JButton SubmmitButton ;
private JButton cancelButton ;
JPanel regPanel = new JPanel();
TitledBorder titledBorder1;
GridBagLayout layout = new GridBagLayout();//整体布局
GridBagLayout gridBagLayout1 = new GridBagLayout();//注册面板布局
private String regname;
private String oldpass;
private String regpass;
private String first;
private int passlen;
private int passnum;
private int oldpasslen;
private String keyfull;
public ChangeFrame1()
{
setTitle("更改口令窗口");
setSize(600,450);
setResizable(false);
addWindowListener(new WindowAdapter()
{
public void windowClosing(WindowEvent e)
{
System.exit(0);
}
});
setLocation(200,100);
GridBagLayout layout = new GridBagLayout();
Container contents = getContentPane();
contents.setLayout(layout);
GridBagConstraints constraints = new GridBagConstraints();
addWindowListener(new WindowAdapter ()
{
public void windowClosing(WindowEvent event)
{
setVisible(false);
dispose();
}
});
try{
jbchange();
}
catch(Exception e){
e.printStackTrace();
}
}//构造方法完成
private void jbchange() throws Exception{
java.awt.Color mycolor=new Color(200,0,0);
titledBorder1 = new TitledBorder(BorderFactory.createEtchedBorder(Color.
white, new Color(165, 163, 151)),
"一次一密口令更改",TitledBorder.CENTER,
TitledBorder.TOP,
new Font("SansSerif",Font.BOLD,22),mycolor);
regPanel.setLayout(gridBagLayout1);
regPanel.setBorder(titledBorder1);
this.getContentPane().setLayout(layout);
this.getContentPane().add(regPanel,
new GridBagConstraints(0, 0, 3, 5, 1.0, 1.0
, GridBagConstraints.NORTH,
GridBagConstraints.BOTH,
new Insets(20, 20, 0, 20), 0, 0));
JPanel buttonPanel = createButtonPanel(); // sets global loginButton
this.getContentPane().add(buttonPanel,
new GridBagConstraints(0, 5, 3, 1, 1.0, 1.0
, GridBagConstraints.SOUTH,
GridBagConstraints.BOTH,
new Insets(10, 100, 10, 10), 0, 0));
//1用户名
NameField = new JTextField(); // needed below
NameField.setPreferredSize(new Dimension(150, 20));
NameLabel = new JLabel();
NameLabel.setFont(new java.awt.Font("宋体", 1, 15));
NameLabel.setText("用 户 姓 名 :");
regPanel.add(NameLabel,
new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0
, GridBagConstraints.WEST,
GridBagConstraints.NONE,
new Insets(5, 40, 5, 0), 8, 13));
regPanel.add(NameField, //用户名文本
new GridBagConstraints(1, 0, 1, 1, 1.0, 0.0
, GridBagConstraints.CENTER,
GridBagConstraints.HORIZONTAL,
new Insets(5, 10, 5, 40), 30, 11));
//2用 户 旧 口 令
oldpasswordField = new JPasswordField(); // needed below
oldpasswordField.setPreferredSize(new Dimension(150, 20));
oldpasswordLabel = new JLabel();
oldpasswordLabel.setFont(new java.awt.Font("宋体", 1, 15));
oldpasswordLabel.setText("登 录 口 令 :");
regPanel.add(oldpasswordLabel,
new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0
, GridBagConstraints.WEST,
GridBagConstraints.NONE,
new Insets(5, 40, 5, 0), 8, 13));
regPanel.add(oldpasswordField,
new GridBagConstraints(1, 1, 1, 1, 1.0, 0.0
, GridBagConstraints.CENTER,
GridBagConstraints.HORIZONTAL,
new Insets(5, 10, 5, 40), 30, 11));
//3用 户 新 口 令
passwordField = new JPasswordField(); // needed below
passwordField.setPreferredSize(new Dimension(150, 20));
passwordLabel = new JLabel();
passwordLabel.setFont(new java.awt.Font("宋体", 1, 15));
passwordLabel.setText("新 的 口 令 :");
regPanel.add(passwordLabel,
new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0
, GridBagConstraints.WEST,
GridBagConstraints.NONE,
new Insets(5, 40, 5, 0), 8, 13));
regPanel.add(passwordField,
new GridBagConstraints(1, 2, 1, 1, 1.0, 0.0
, GridBagConstraints.CENTER,
GridBagConstraints.HORIZONTAL,
new Insets(5, 10, 5, 40), 30, 11));
//4重 输 口 令
repasswordField = new JPasswordField(); // needed below
repasswordField.setPreferredSize(new Dimension(150, 20));
repasswordLabel = new JLabel();
repasswordLabel.setFont(new java.awt.Font("宋体", 1, 15));
repasswordLabel.setText("确 认 口 令 :");
regPanel.add(repasswordLabel,
new GridBagConstraints(0, 3, 1, 1, 0.0, 0.0
, GridBagConstraints.WEST,
GridBagConstraints.NONE,
new Insets(5, 40, 5, 0), 8, 13));
regPanel.add(repasswordField,
new GridBagConstraints(1, 3, 1, 1, 1.0, 0.0
, GridBagConstraints.CENTER,
GridBagConstraints.HORIZONTAL,
new Insets(5, 10, 5, 40), 30, 11));
//5口令长度
passlenField = new JTextField(); // needed below
passlenField.setPreferredSize(new Dimension(150, 20));
passlenLabel = new JLabel();
passlenLabel.setFont(new java.awt.Font("宋体", 1, 15));
passlenLabel.setText("口 令 长 度 :");
regPanel.add(passlenLabel,
new GridBagConstraints(0, 4, 1, 1, 0.0, 0.0
, GridBagConstraints.WEST,
GridBagConstraints.NONE,
new Insets(5, 40, 5, 0), 8, 13));
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
基于Java的两个通用安全模块的设计与实现毕业设计—(包含完整源码可运行).rar (28个子文件)
基于Java的两个通用安全模块的设计与实现
Myserverfile.java 10KB
LoginFrame.java 11KB
证书
mytest.cer 1KB
mykeystore 1KB
clienttrust 874B
Myselectfile.java 7KB
RegisterFrame.java 10KB
MySSLClientFile.java 4KB
MySSLServerRule.java 3KB
mypackage
MyProductKey.java 2KB
MyProductKey.class 2KB
ProductKey.java 168B
MyEnc_Dec.java 3KB
Enc_Dec.java 198B
saveEnc_Decfile.class 332B
Enc_Dec.class 170B
saveEnc_Decfile.java 349B
MyEnc_Dec.class 2KB
ProductKey.class 225B
MysaveEnc_Decfile.class 3KB
MysaveEnc_Decfile.java 3KB
RegisterFrame1.java 13KB
H2003032197王蕾-基于Java的两个通用安全模块的设计与实现.doc 558KB
keyDialog.java 4KB
ChangeFrame.java 12KB
DATA
MyDB_Data.MDF 1024KB
MyDB_Log.LDF 1024KB
ChangeFrame1.java 15KB
共 28 条
- 1
资源评论
yyyyyyhhh222
- 粉丝: 412
- 资源: 6万+
下载权益
C知道特权
VIP文章
课程特权
开通VIP
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 基于Pytorch训练CIRAR10上分类算法.zip
- Pytorch-pytorch深度学习教程之Tensorboard.zip
- 基于C++和Python开发yolov8-face作为人脸检测器dlib作为人脸识别器的人脸考勤系统源码+项目说明.zip
- Pytorch-pytorch深度学习教程之变分自动编码器.zip
- Pytorch-pytorch深度学习教程之神经风格迁移.zip
- Pytorch-pytorch深度学习教程之深度残差网络.zip
- Pytorch-pytorch深度学习教程之循环神经网络.zip
- Pytorch-pytorch深度学习教程之逻辑回归.zip
- Pytorch-pytorch深度学习教程之双向循环网络.zip
- Pytorch-pytorch深度学习教程之卷积神经网络.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功