100字范文,内容丰富有趣,生活中的好帮手!
100字范文 > java 验证码 添加背景图_java登陆界面怎么加背景图 会的我加你

java 验证码 添加背景图_java登陆界面怎么加背景图 会的我加你

时间:2021-12-22 06:27:06

相关推荐

java 验证码 添加背景图_java登陆界面怎么加背景图 会的我加你

publicvoiduserInit(){this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);//设置关闭框架的同时结束程序this.setSize(500,300);//设置框架大小为长500,宽300this.setResizable(fa...

public void userInit(){

this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);//设置关闭框架的同时结束程序

this.setSize(500,300);//设置框架大小为长500,宽300

this.setResizable(false);//设置框架不可以改变大小

this.setTitle("学生管理系统");//设置框架标题

this.pnluser.setLayout(null);//设置面板布局管理

this.pnluser.setBackground(Color.pink);//设置面板背景颜色

this.lbluserLogIn.setText("学生管理系统");//设置标签标题

this.lbluserLogIn.setFont(new Font("宋体",Font.BOLD | Font.ITALIC,20));//设置标签字体

this.lbluserLogIn.setForeground(Color.RED);//设置标签字体颜色

this.lbluserName.setText("用户名:");

this.lbluserPWD.setText("密 码:");

this.btnSub.setText("登录");

this.btnReset.setText("重置");

this.lbluserLogIn.setBounds(200,15,200,20);//设置标签x坐标120,y坐标15,长60,宽20

this.lbluserName.setBounds(90,55,60,20);

this.lbluserPWD.setBounds(90,85,60,25);

this.txtName.setBounds(160,55,200,20);

this.pwdPwd.setBounds(160,85,200,20);

this.btnSub.setBounds(85,120,60,20);

this.btnSub.addActionListener(new ActionListener()//匿名类实现ActionListener接口

{

public void actionPerformed(ActionEvent e){

btnsub_ActionEvent(e);

}

}

);

this.btnReset.setBounds(155,120,60,20);

this.btnReset.addActionListener(new ActionListener()//匿名类实现ActionListener接口

{

public void actionPerformed(ActionEvent e){

btnreset_ActionEvent(e);

}

}

展开

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。