登录
首页 » Java » java以及java基础学习 chm教程

java以及java基础学习 chm教程

于 2014-08-15 发布
0 114
下载积分: 1 下载次数: 0

代码说明:

java以及java基础学习 chm教程

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • java 上位机与单片机通过串口485通讯
    上位机与单片机通过串口485通讯
    2018-01-10下载
    积分:1
  • 达蒙教程(DM8 SQL程序设计.pdf)
    【实例简介】
    2021-06-19 00:31:26下载
    积分:1
  • java设备维修记录录入(含数据库脚本)
    java设备维修记录录入(含数据库脚本)
    2020-03-23下载
    积分:1
  • Java 显示多分类区域图(提高篇-实例229).zip
    Java 显示多分类区域图(提高篇-实例229).zip
    2019-10-03下载
    积分:1
  • java实验室预约管理系统(源码+数据库脚本)
    随着高校教学资源逐步开发,高校教育资源的应用种类逐步增多。而实验室作为高校基本教育资源之一,与日常教学工作开展、课堂项目实践有着密切联系。由此,如何借助新时期技术,加强高校实验室应用数据信息程序开发,在高校智能化管理程序推广中占有基础性地位。该软件是以Java语言为实现预言。其功能在系统内部有源代码直接完成,操作人员只需输入一些简单的汉字,数字,即可达到自己的目标。 登陆账号:admin 密码:123456 package com.company; import com.company.Bean.Student;import com.company.Bean.Teacher;import com.company.Bean.User;import com.company.DB.DB; import javax.swing.*;import java.awt.event.ActionEvent;import java.awt.event.ActionListener; public class Main extends JFrame {    private JPanel p;    private JLabel lblName,lblPwd,lblRole;    private JTextField txtName;    private JPasswordField txtPwd;    private JButton btnOk,btnCancle;    String[] s = {"学生","教师","管理员"};    private JComboBox comboBox;    public Main(){        super("用户登录界面");        p = new JPanel();        p.setLayout(null);        lblRole=new JLabel("角色:");        comboBox=new JComboBox(s);        lblName = new JLabel("账户:");        lblPwd = new JLabel("密码:");        txtName = new JTextField(20);        txtPwd = new JPasswordField(20);        btnOk = new JButton("登录");        btnCancle = new JButton("取消");        //注册确定按钮的事件处理        btnOk.addActionListener(new ActionListener() {            @Override            public void actionPerformed(ActionEvent e) {                String strName = txtName.getText();                String strPwd = new String(txtPwd.getPassword());                System.out.println("用户名:" strName "密码:" strPwd);             }        });        //注册取消按钮的事件处理        btnCancle.addActionListener(new ActionListener() {             @Override            public void actionPerformed(ActionEvent e) {                //清空                txtName.setText("");                txtPwd.setText("");             }        });        lblRole.setBounds(90,50,60,25);        comboBox.setBounds(130,50,140,25);        lblName.setBounds(90,80,60,25);        txtName.setBounds(130,80,140,25);        lblPwd.setBounds(90,110,60,25);        txtPwd.setBounds(130,110,140,25);        btnOk.setBounds(130,150,60,25);        btnCancle.setBounds(200,150,60,25);        p.add(lblRole);        p.add(comboBox);        p.add(lblName);        p.add(txtName);        p.add(lblPwd);        p.add(txtPwd);        p.add(btnOk);        p.add(btnCancle);        this.add(p);        this.setSize(400,300);        this.setLocation(300,300);        //设置窗体不可改变大小        this.setResizable(false);        this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);        btnOk.addActionListener(new ActionListener() {            @Override            public void actionPerformed(ActionEvent e) {               String account =txtName.getText().trim();               String password=txtPwd.getText().trim();               String role=null;               if(comboBox.getSelectedItem().equals("管理员")){                   role="admin";               }               else if(comboBox.getSelectedItem().equals("学生")) {                   role="student";               }               else{                   role="teacher";               }                if(role.equals("admin")){                    User user=new User(account,password);                    if (DB.Login(user)) {                        JOptionPane.showMessageDialog(null, "登录成功", "", JOptionPane.PLAIN_MESSAGE);                        AdminMain adminMain = new AdminMain();                        adminMain.setVisible(true);                        Main.this.setVisible(false);                    }                      else {                        JOptionPane.showMessageDialog(null,"账号密码错误", "", JOptionPane.PLAIN_MESSAGE);                    }                }                else if (role.equals("student")){                    Student student=new Student(account,password);                    if(DB.studentLogin(student)){                        StudentMain studentMain=new  StudentMain();                        studentMain.setVisible(true);                        Main.this.setVisible(false);                        JOptionPane.showMessageDialog(null, "登录成功", "", JOptionPane.PLAIN_MESSAGE);                    }                    else {                        JOptionPane.showMessageDialog(null,"账号密码错误", "", JOptionPane.PLAIN_MESSAGE);                    }                }                else if (role.equals("teacher")){                   Teacher teacher=new Teacher(account,password);                    if(DB.teacherLogin(teacher)){                        TeacherMain teacherMain=new TeacherMain();                        teacherMain.setVisible(true);                        Main.this.setVisible(false);                        JOptionPane.showMessageDialog(null, "登录成功", "", JOptionPane.PLAIN_MESSAGE);                    }                    else {                        JOptionPane.showMessageDialog(null,"账号密码错误", "", JOptionPane.PLAIN_MESSAGE);                    }                }            }        });        btnCancle.addActionListener(new ActionListener() {            @Override            public void actionPerformed(ActionEvent e) {                            }        });    }    public static void main(String[] args) { // write your code here        Main main=new Main();        main.setVisible(true);     }}
    2020-12-12下载
    积分:1
  • Java篇:IO流.pdf
    Java基础篇:IO流 【文件目录】File类的使用File类的概述File类的实例化File类的常用方法IO流原理及流的分类Java IO原理流的分类流的体系结构输入、输出的标准化过程节点流(文件流)缓冲流转换流标准输入、输出流打印流数据流对象流随机存取文件流
    2020-11-02下载
    积分:1
  • 酒店预定管理系统(源码+数据库+文档)
    酒店预订管理系统 一、后台需求列表清单 1、预订管理(Reservation) 1.1 查询预订 (Search) 1.2 新建预订(new) 1.3 修改预订 (modify) 1.4 取消预订 (cancel) 2、房价类型管理(Rate Type) 2.1 查询 (search) 2.2 新建(new) 2.3 修改 (modify) 2.4 删除 (delete) 3、房间类型管理(Room Type) 3.1 查询(search) 3.2 新建(new) 3.3 修改(modify) 3.4 删除(delete) 4、房价管理(Rate)(批量操作) 4.1 房价查询 (Rate Query) 4.2 房价规则查询(Rate Rule Query) 4.3 新增房价规则 (add) 4.4 修改房价规则(modify) 4.5 删除房价规则 (delete) 5、房态管理(Room Status)(批量操作) 5.1 查询房态(search) 5.2 新增规则(add) 5.3 修改规则(modify) 5.4 删除规则(delete) 5.5 查询规则(search) 6、员工管理(Staff) 6.1 查询(search) 6.2 新建(new) 6.3 修改(modify) 6.4 删除(delete)
    2021-05-06下载
    积分:1
  • ios 刮刮卡
    ios 刮刮卡
    2014-01-15下载
    积分:1
  • springboot+layui开发的博客系统
    springboot layui maven前端开发的博客系统,开发工具idea,有前台和后台
    2020-12-06下载
    积分:1
  • java 学生信息管理系统(于XML)
    这是一个基于XML操作的学生信息管理小系统,实现了对学生信息的录入,查找,删除等操作。可以说是一个简易的“数据库”综合小应用!
    2019-06-12下载
    积分:1
  • 696518资源总数
  • 105877会员总数
  • 14今日下载