zoukankan      html  css  js  c++  java
  • 2016/04/20

    package com.wode.test;

    import java.awt.Container;

    import javax.swing.JButton;
    import javax.swing.JCheckBox;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JPanel;
    import javax.swing.JPasswordField;
    import javax.swing.JRadioButton;
    import javax.swing.JTabbedPane;
    import javax.swing.JTextField;

    public class Student extends JFrame{

     public Student(String title){
      super(title);
      Container c=this.getContentPane();
      this.setSize(400, 300);
      this.setLocationRelativeTo(null);
      this.setLayout(null);
      this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
      this.setResizable(false);
      JLabel jLabelName = new JLabel("用户名:");
      JLabel jLabelpassword = new JLabel("密码:");
      JPanel jPanel = new JPanel();  
      jPanel.setLayout(null);  
      jPanel.setBounds(1, 1, 400, 300);
      jLabelName.setBounds(100, 65, 60, 20);
      jLabelpassword.setBounds(100, 120, 60, 20);
      jPanel.add(jLabelpassword);
      jPanel.add(jLabelName);
      JTextField txtName = new JTextField();
      txtName.setBounds(180, 65, 85, 20);
      jPanel.add(txtName);
      JPasswordField txtpassword = new JPasswordField();
      txtpassword.setBounds(180, 120, 85, 20);
      jPanel.add(txtpassword);
      JButton okbtn=new JButton("确定");
      okbtn.setBounds(110, 200, 60, 40);
      jPanel.add(okbtn);
      JButton cancelbtn=new JButton("取消");
      cancelbtn.setBounds(220, 200, 60, 40);
      jPanel.add(cancelbtn);
      JRadioButton supervise = new JRadioButton("管理登陆");
      supervise.setBounds(100,25, 120, 20);
      jPanel.add(supervise);
      JRadioButton studnet = new JRadioButton("学生登陆");
      studnet.setBounds(220,25, 120, 20);
      jPanel.add(studnet);
      JLabel newName = new JLabel("注册账号");
      newName.setBounds(280, 65, 60, 20);
      jPanel.add(newName);
      JLabel password = new JLabel("密码找回");
      password.setBounds(280, 120, 60, 20);
      jPanel.add(password);
      JCheckBox remember = new JCheckBox("记住密码");
      remember.setBounds(110, 160, 110, 20);
      jPanel.add(remember);
      JCheckBox automatic = new JCheckBox("自动登陆");
      automatic.setBounds(225, 160, 110, 20);
      jPanel.add(automatic);
      this.add(jPanel);
      this.setVisible(true);
      
     }
     public static void main(String[] args) {
      new Student("学生管理系统");
     }
    }

  • 相关阅读:
    Django 模版当中使用中文 UnicodeDecodeError at / 问题
    sql中索引不会被用到的几种情况
    Django安装
    分享一个webapi接口性能测试的工具
    orleans 2.0 进阶之自定义持久化储存
    centos7 .net core 使用supervisor守护进程,可以后台运行
    将.net core 发布到Linux上的一些坑
    .net core 部署在Linux系统上运行的环境搭建总结
    .net core 基于NPOI 的excel导入导出类,支持自定义导出哪些字段,和判断导入是否有失败的记录
    基于Ace Admin 的菜单栏实现
  • 原文地址:https://www.cnblogs.com/chenyangpeng/p/5414511.html
Copyright © 2011-2022 走看看