*/
public boolean doUpdate(UserInfo user) throws Exception;
/**
-
删除用户
-
@param user
-
@return
-
@throws Exception
*/
public boolean doDelete(String username) throws Exception;
/**
-
数据库查询操作
-
@param id
-
@return
-
@throws Exception
*/
public UserInfo findById(String id) throws Exception;
/**
-
做查询操作
-
@param id
-
@return
-
@throws Exception
*/
public List findAll(String keyword) throws Exception;
}
package com.sjsq.dao.ImpI;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.util.ArrayList;
import java.util.List;
import com.sjsq.dao.IUserInfoDAO;
import com.sjsq.entity.UserInfo;
public class UserInfoDaoImpI implements IUserInfoDAO {
private Connection conn = null;
public UserInfoDaoImpI(Connection conn) {
this.conn = conn;
}
@Override
public boolean doCreate(UserInfo user) throws Exception {
// Auto-generated method stub
// 增加信息
boolean flag = false;
PreparedStatement pstmt = null;
String sql = “INSERT INTO UserInfo_tab(userName ,NickName,UserPass,grade)VALUES(?,?,?,?)”;
try {
pstmt = this.conn.prepareStatement(sql);
pstmt.setString(1, user.getUserName());
pstmt.setString(2, user.getNickName());
pstmt.setString(3, user.getUserPass());
pstmt.setInt(4, user.getGrade());
if (pstmt.executeUpdate() > 0) {
flag = true;
}
} catch (Exception e) {
throw e;
} finally {
try {
if (pstmt != null) {
pstmt.close();
}
} catch (Exception e) {
}
}
return flag;
}
@Override
public boolean doUpdate(UserInfo user) throws Exception {
// 更新用户信息
boolean flag = false;
PreparedStatement pstmt = null;
String sql = “UPDATE UserInfo_tab SET UserPass=? WHERE UserName=?”;
try {
pstmt = this.conn.prepareStatement(sql);
pstmt.setString(1, user.getUserPass());
pstmt.setString(2, user.getUserName());
if (pstmt.executeUpdate() > 0) {
flag = true;
}
} catch (Exception e) {
throw e;
} finally {
try {
if (pstmt != null) {
pstmt.close();
}
} catch (Exception e) {
}
}
return flag;
}
@Override
public boolean doDelete(String username) throws Exception {
// 删除用户信息
boolean flag = false;
PreparedStatement pstmt = null;
String sql = “DELETE FROM UserInfo_tab WHERE UserName=?”;
try {
pstmt = this.conn.prepareStatement(sql);
pstmt.setString(1, username);
if (pstmt.executeUpdate() > 0) {
flag = true;
}
} catch (Exception e) {
throw e;
} finally {
try {
if (pstmt != null) {
pstmt.close();
}
} catch (Exception e) {
}
}
return flag;
}
@Override
public List findAll(String keyword) throws Exception {
// 查找用户信息-关键字查找
List all = new ArrayList();
PreparedStatement pstmt = null;
String sql = “SELECT ID,UserName,NickName,UserPass,Grade WHERE UserName LIKE ? OR NickName LIKE ?”;
try {
pstmt = this.conn.prepareStatement(sql);
pstmt.setString(1, “%” + keyword + “%”);
pstmt.setString(2, “%” + keyword + “%”);
ResultSet rs = pstmt.executeQuery();
while (rs.next()) {
UserInfo user = new UserInfo();
user.setID(rs.getInt(1));
user.setUserName(rs.getString(2));
user.setNickName(rs.getString(3));
user.setUserPass(rs.getString(4));
user.setGrade(rs.getInt(5));
all.add(user);
}
rs.close();
} catch (Exception e) {
throw e;
} finally {
try {
if (pstmt != null) {
pstmt.close();
}
} catch (Exception e) {
}
}
return all;
}
// @Override
public UserInfo findById(String id) throws Exception {
// 查找用户信息-ID查找
UserInfo user = null;
PreparedStatement pstmt = null;
String sql = “SELECT * FROM UserInfo_tab WHERE UserName=?”;
try {
pstmt = this.conn.prepareStatement(sql);
pstmt.setString(1, id);
ResultSet rs = pstmt.executeQuery();
while (rs.next()) {
user = new UserInfo();
user.setID(rs.getInt(1));
user.setUserName(rs.getString(2));
user.setNickName(rs.getString(3));
user.setUserPass(rs.getString(4));
user.setGrade(rs.getInt(5));
}
rs.close();
} catch (Exception e) {
throw e;
} finally {
try {
if (pstmt != null) {
pstmt.close();
}
} catch (Exception e) {
}
}
return user;
}
}
package com.sjsq.entity;
/**
-
@author HZBIN1993
-
@author shuijianshiqing
-
@date 2021-01-09
*/
public class UserInfo {
private int ID;
private String nickName;
private String UserName;
private String UserPass;
private int Grade;
public UserInfo() {
super();
}
public UserInfo(int iD, String userName) {
super();
ID = iD;
UserName = userName;
}
public String getNickName() {
return nickName;
}
public void setNickName(String nickName) {
this.nickName = nickName;
}
public int getID() {
return ID;
}
public void setID(int iD) {
ID = iD;
}
public String getUserName() {
return UserName;
}
public void setUserName(String userName) {
UserName = userName;
}
public String getUserPass() {
return UserPass;
}
public void setUserPass(String userPass) {
UserPass = userPass;
}
public int getGrade() {
return Grade;
}
public void setGrade(int grade) {
Grade = grade;
}
@Override
public String toString() {
// Auto-generated method stub
String grade = “学生”;
if (Grade == 0) {
grade = “教务人员”;
} else if (Grade == 1) {
grade = “教师”;
}
return "ID: " + ID + ",用户名为: " + UserName + "权限为: " + grade;
}
}
package com.sjsq.factory;
import com.sjsq.dao.IArrangeInfoDao;
import com.sjsq.dao.IClassInfoDao;
import com.sjsq.dao.ICourseInfoDao;
import com.sjsq.dao.IScoreInfoDao;
import com.sjsq.dao.IStudentInfoDao;
import com.sjsq.dao.ITeacherInfoDao;
import com.sjsq.dao.IUserInfoDAO;
import com.sjsq.proxy.ArrangeInfoDaoImpIPoxy;
import com.sjsq.proxy.ClassInfoDaoImpIPoxy;
import com.sjsq.proxy.CourseInfoDaoImpIProxy;
import com.sjsq.proxy.ScoreInfoDaoImpIProxy;
import com.sjsq.proxy.StudentInfoDaoImpIProxy;
import com.sjsq.proxy.TeacherInfoDaoImpIProxy;
import com.sjsq.proxy.UserInfoDaoImpIProxy;
/**
-
创建工厂类
-
@author Administrator
*/
public class DAOFactory {
public static IUserInfoDAO getIUserDAOInstance() {
// 用户信息操作工厂
return new UserInfoDaoImpIProxy();
}
public static IScoreInfoDao getScoreDAOInstance() {
// 成绩操作工厂
return new ScoreInfoDaoImpIProxy();
}
public static ICourseInfoDao getCourseDAOInstance() {
// 课程操作工厂
return new CourseInfoDaoImpIProxy();
}
public static IStudentInfoDao getStudentDAOInstance() {
// 学生操作工厂
return new StudentInfoDaoImpIProxy();
}
public static IClassInfoDao getClassDAOInstance() {
// 班级操作工厂
return new ClassInfoDaoImpIPoxy();
}
public static ITeacherInfoDao getTeacherDAOInstance() {
// 老师操作工厂
return new TeacherInfoDaoImpIProxy();
}
public static IArrangeInfoDao getArrangeDaoInstance() {
// 选课信息操作工厂
return new ArrangeInfoDaoImpIPoxy();
}
}
package com.sjsq.proxy;
import java.util.List;
import com.sjsq.dao.IUserInfoDAO;
import com.sjsq.dao.ImpI.UserInfoDaoImpI;
import com.sjsq.dbConnect.DataBaseConn;
import com.sjsq.entity.UserInfo;
/**
-
用户信息代理类
-
@author shuijianshiqing
*/
public class UserInfoDaoImpIProxy implements IUserInfoDAO {
private DataBaseConn dbc = null;
private IUserInfoDAO dao = null;
public UserInfoDaoImpIProxy() {
dbc = new DataBaseConn();
dao = new UserInfoDaoImpI(dbc.getConnection());
}
@Override
public boolean doCreate(UserInfo user) throws Exception {
// 增加用户信息(代理实现)
boolean flag = true;
try {
flag = this.dao.doCreate(user);
} catch (Exception e) {
throw e;
} finally {
this.dbc.close();
}
return flag;
}
@Override
public boolean doUpdate(UserInfo user) throws Exception {
// 更新用户信息(代理实现)
boolean flag = true;
try {
flag = this.dao.doUpdate(user);
} catch (Exception e) {
throw e;
} finally {
this.dbc.close();
}
return flag;
}
@Override
public boolean doDelete(String username) throws Exception {
// 删除用户信息(代理实现)
boolean flag = true;
try {
flag = this.dao.doDelete(username);
} catch (Exception e) {
throw e;
} finally {
this.dbc.close();
}
return flag;
}
@Override
public List findAll(String keyword) throws Exception {
// 查找用户信息-关键字查找(代理实现)
List all = null;
try {
all = this.dao.findAll(keyword);
} catch (Exception e) {
throw e;
} finally {
this.dbc.close();
}
return all;
}
@Override
public UserInfo findById(String id) throws Exception {
// 查找用户信息-ID查找(代理实现)
UserInfo user = null;
try {
user = this.dao.findById(id);
} catch (Exception e) {
throw e;
} finally {
this.dbc.close();
}
return user;
}
}
package com.sjsq.util;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.Locale;
public class DateUtil {
public static String getAfterDay(String date, int num) {
SimpleDateFormat parser = new SimpleDateFormat(“yyyy-MM-dd”);
Date dt = null;
try {
dt = parser.parse(date);
} catch (ParseException e) {
e.printStackTrace();
}
Calendar calendar = Calendar.getInstance();
calendar.setTime(dt);
calendar.add(Calendar.DATE, num);
SimpleDateFormat simpledateformat = new SimpleDateFormat(“yyyy-MM-dd”, Locale.ENGLISH);
return simpledateformat.format(calendar.getTime());
}
public static String getBeforeDate(int num) {
Calendar calendar = Calendar.getInstance();
calendar.setTime(new Date());
calendar.add(Calendar.DATE, -num);
SimpleDateFormat simpledateformat = new SimpleDateFormat(“yyyy-MM-dd”, Locale.ENGLISH);
return simpledateformat.format(calendar.getTime());
}
public static String getDate() {
Date dt = new Date();
long tmLong = dt.getTime();
return (new java.sql.Date(tmLong)).toString();
}
public static String getDateTime() {
Date dt = new Date();
Long tmLong = dt.getTime();
return (new java.sql.Date(tmLong) + " " + (new java.sql.Time(tmLong))).toString();
}
public static java.sql.Date getStringToDate(String day) {
SimpleDateFormat parser = new SimpleDateFormat(“yyyy-MM-dd”);
Date dt = new Date();
try {
dt = parser.parse(day);
} catch (ParseException e) {
e.printStackTrace();
}
return (new java.sql.Date(dt.getTime()));
}
}
package com.sjsq.window;
import java.awt.AWTException;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.Image;
import java.awt.MenuItem;
import java.awt.PopupMenu;
import java.awt.SystemColor;
import java.awt.SystemTray;
import java.awt.Toolkit;
import java.awt.TrayIcon;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.KeyEvent;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.net.URL;
import javax.swing.AbstractAction;
import javax.swing.Action;
import javax.swing.ButtonGroup;
import javax.swing.GroupLayout;
import javax.swing.GroupLayout.Alignment;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;
import javax.swing.JOptionPane;
import javax.swing.JPasswordField;
import javax.swing.JRadioButton;
import javax.swing.JTextField;
import javax.swing.KeyStroke;
import javax.swing.LayoutStyle.ComponentPlacement;
import com.sjsq.entity.UserInfo;
import com.sjsq.factory.DAOFactory;
import com.sjsq.util.GlobalUser;
/**
-
登录
-
@author shuijianshiqing
-
@date 2021-01-09 20:42
*/
public class Login extends JFrame {
private final Action action = new SwingAction();
private JTextField textField;
private final ButtonGroup buttonGroup = new ButtonGroup();
private JPasswordField passwordField;
private JRadioButton rdbtnNewRadioButton = null;
private JRadioButton rdbtnNewRadioButton_1 = null;
private JRadioButton rdbtnNewRadioButton_2 = null;
public Login() {
setResizable(false);
getContentPane().setBackground(SystemColor.menu);
setSize(new Dimension(341, 410));
setTitle(“教务管理系统”);
setLocationRelativeTo(null);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
JMenuBar menuBar = new JMenuBar();
setJMenuBar(menuBar);
JMenu mnFile = new JMenu(“菜单”);
mnFile.setFont(new Font(“微软雅黑”, Font.PLAIN, 16));
menuBar.add(mnFile);
JMenuItem mntmNewMenuItem = new JMenuItem(“退出”);
mntmNewMenuItem.setFont(new Font(“微软雅黑”, Font.PLAIN, 16));
mntmNewMenuItem.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
System.exit(0);
}
});
mntmNewMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_STOP, 0));
mnFile.add(mntmNewMenuItem);
JMenu mnHelp = new JMenu(“帮助”);
mnHelp.setFont(new Font(“微软雅黑”, Font.PLAIN, 16));
menuBar.add(mnHelp);
JMenuItem mntmNewMenuItem_1 = new JMenuItem(“关于”);
mntmNewMenuItem_1.setFont(new Font(“微软雅黑”, Font.PLAIN, 16));
mntmNewMenuItem_1.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
mntmNewMenuItem_1actionPerformed(e);
}
});
mnHelp.add(mntmNewMenuItem_1);
JLabel lblNewLabel = new JLabel(“New label”);
lblNewLabel.setIcon(new ImageIcon(Login.class.getResource(“/images/login.jpg”)));
JLabel lblNewLabel_1 = new JLabel(“账号”);
JLabel lblNewLabel_2 = new JLabel(“密码”);
textField = new JTextField();
textField.setColumns(0);
rdbtnNewRadioButton = new JRadioButton(“学生”);
rdbtnNewRadioButton.setSelected(true);
buttonGroup.add(rdbtnNewRadioButton);
rdbtnNewRadioButton_1 = new JRadioButton(“教师”);
buttonGroup.add(rdbtnNewRadioButton_1);
rdbtnNewRadioButton_2 = new JRadioButton(“教务人员”);
buttonGroup.add(rdbtnNewRadioButton_2);
JButton btnNewButton = new JButton(“登录”);
btnNewButton.setDoubleBuffered(true);
btnNewButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent event) {
btnNewButtonactionPerformed(event);
}
});
JButton btnNewButton_1 = new JButton(“取消”);
btnNewButton_1.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
System.exit(0);
}
});
passwordField = new JPasswordField();
GroupLayout groupLayout = new GroupLayout(getContentPane());
groupLayout.setHorizontalGroup(groupLayout.createParallelGroup(Alignment.LEADING).addGroup(groupLayout
.createSequentialGroup().addGap(70)
.addGroup(groupLayout.createParallelGroup(Alignment.LEADING)
.addGroup(groupLayout.createSequentialGroup()
.addComponent(lblNewLabel_2, GroupLayout.PREFERRED_SIZE, 36, GroupLayout.PREFERRED_SIZE)
.addGap(8).addComponent(passwordField, 166, 166, 166))
.addGroup(groupLayout.createSequentialGroup().addComponent(rdbtnNewRadioButton).addGap(18)
.addComponent(rdbtnNewRadioButton_1).addPreferredGap(ComponentPlacement.UNRELATED)
.addComponent(rdbtnNewRadioButton_2))
.addGroup(groupLayout.createSequentialGroup().addComponent(lblNewLabel_1).addGap(18)
.addComponent(textField, GroupLayout.PREFERRED_SIZE, 166, GroupLayout.PREFERRED_SIZE)))
.addContainerGap(18, Short.MAX_VALUE))
.addComponent(lblNewLabel, GroupLayout.PREFERRED_SIZE, 341, Short.MAX_VALUE)
.addGroup(Alignment.TRAILING, groupLayout.createSequentialGroup().addContainerGap(82, Short.MAX_VALUE)
.addComponent(btnNewButton).addGap(27).addComponent(btnNewButton_1).addGap(118)));
groupLayout.setVerticalGroup(groupLayout.createParallelGroup(Alignment.LEADING).addGroup(groupLayout
.createSequentialGroup()
.addComponent(lblNewLabel, GroupLayout.PREFERRED_SIZE, 170, GroupLayout.PREFERRED_SIZE).addGap(18)
.addGroup(groupLayout.createParallelGroup(Alignment.LEADING).addComponent(lblNewLabel_1).addComponent(
textField, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
.addPreferredGap(ComponentPlacement.RELATED)
.addGroup(groupLayout
.createParallelGroup(Alignment.BASELINE).addComponent(lblNewLabel_2).addComponent(passwordField,
GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
.addGap(18)
.addGroup(groupLayout.createParallelGroup(Alignment.BASELINE).addComponent(rdbtnNewRadioButton_2)
.addComponent(rdbtnNewRadioButton_1).addComponent(rdbtnNewRadioButton))
.addGap(18).addGroup(groupLayout.createParallelGroup(Alignment.BASELINE).addComponent(btnNewButton_1)
.addComponent(btnNewButton))
.addContainerGap(40, Short.MAX_VALUE)));
getContentPane().setLayout(groupLayout);
addTrayIcon();
}
// 给心痛托盘区添加图标
private void addTrayIcon() {
// Auto-generated method stub
SystemTray st = SystemTray.getSystemTray();
if (SystemTray.isSupported()) {
URL imgurl = this.getClass().getClassLoader().getResource(“images/login_main.jpg”);
Image img = Toolkit.getDefaultToolkit().createImage(imgurl);
// Image
// img=Toolkit.getDefaultToolkit().createImage(“images/aboutme.jpg”);
PopupMenu popup = new PopupMenu();
MenuItem item = new MenuItem(“退出程序”);
item.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
// Auto-generated method stub
System.exit(0);
}
});
popup.add(item);
TrayIcon icon = new TrayIcon(img, “教务管理系统”, popup);
icon.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
if (e.getClickCount() == 2) {
UserInfo u = GlobalUser.LOGIN_USER;
if (u == null) {
Login.start();
} else if (u.getGrade() == 0) {
AdminFrame.start();
} else if (u.getGrade() == 1) {
TeacherFrame.start();
} else if (u.getGrade() == 2) {
StudentFrame.start();
}
}
}
});
icon.setImageAutoSize(true);
try {
st.add(icon);
} catch (AWTException e1) {
e1.printStackTrace();
}
}
}
protected void mntmNewMenuItem_1actionPerformed(ActionEvent e) {
About.start();
}
protected void btnNewButtonactionPerformed(ActionEvent event) {
String name = textField.getText();// 获得用户名
String pass = String.valueOf(passwordField.getPassword());
UserInfo user = null;
// 未输入用户名
if (name.equals(“”)) {
JOptionPane.showMessageDialog(this, “用户名不允许为空!”, “提示”, 2);
return;
}
try {
user = DAOFactory.getIUserDAOInstance().findById(name);
// System.out.println(user);
if (user != null) {
if (user.getUserPass() != null && user.getUserPass().equals(pass)) {
GlobalUser.LOGIN_USER = user; // 记录当前用户
// 进入主界面
if (rdbtnNewRadioButton.isSelected()) {
if (user.getGrade() != 2) {
JOptionPane.showMessageDialog(this, “该用户不是学生!”, “消息”, 2);
return;
}
// 学生界面
StudentFrame.start();
} else if (rdbtnNewRadioButton_1.isSelected()) {
if (user.getGrade() != 1) {
JOptionPane.showMessageDialog(this, “该用户不是老师!”, “消息”, 2);
return;
}
// 教师界面
TeacherFrame.start();
} else if (rdbtnNewRadioButton_2.isSelected()) {
if (user.getGrade() != 0) {
JOptionPane.showMessageDialog(this, “该用户不是教务人员!”, “消息”, 2);
return;
}
// 教务人员界面
AdminFrame.start();
} else {
JOptionPane.showMessageDialog(this, “别急!权限没选呢”);
return;
}
this.dispose();
} else {
JOptionPane.showMessageDialog(this, “用户名或密码错误!”, “消息”, 2);
return;
}
}
} catch (Exception e) {
e.printStackTrace();
}
if (user == null) {
JOptionPane.showMessageDialog(this, “用户名或密码错误!”, “消息”, 0);
return;
}
}
private class SwingAction extends AbstractAction {
public SwingAction() {
putValue(NAME, “SwingAction”);
putValue(SHORT_DESCRIPTION, “Some short description”);
}
public void actionPerformed(ActionEvent e) {
}
}
public static void start() {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new Login().setVisible(true);
}
});
}
public static void main(String[] args) {
new Login().setVisible(true);
}
}
package com.sjsq.window;
import java.awt.Dimension;
import javax.swing.JFrame;
import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import java.io.IOException;
import javax.swing.GroupLayout;
import javax.swing.GroupLayout.Alignment;
import javax.swing.JLabel;
import javax.swing.LayoutStyle.ComponentPlacement;
import javax.swing.SwingConstants;
import com.sjsq.util.DateUtil;
import com.sjsq.util.GlobalUser;
import com.sjsq.util.imageUtils;
import com.sjsq.util.msgUtils;
import java.awt.Color;
import java.awt.Font;
public class AdminFrame extends JFrame {
private JLabel lblNewLabel_3;
private JLabel lblNewLabel_1;
private JLabel lblNewLabel_2;
private JLabel lblNewLabel;
/**
*/
private static final long serialVersionUID = 1L;
public AdminFrame() {
setResizable(false);
setTitle(“教务管理系统—教务人员”);
setSize(new Dimension(800, 500));
setLocationRelativeTo(null);
JMenuBar menuBar = new JMenuBar();
setJMenuBar(menuBar);
JMenu mnNewMenu = new JMenu(“工具”);
menuBar.add(mnNewMenu);
JMenu menu_1 = new JMenu(“系统工具”);
mnNewMenu.add(menu_1);
JMenuItem mntmNewMenuItem_24 = new JMenuItem(“cmd”);
mntmNewMenuItem_24.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent event) {
mntmNewMenuItem_24actionPerformed(event);
}
});
menu_1.add(mntmNewMenuItem_24);
JMenuItem mntmNewMenuItem_25 = new JMenuItem(“截图”);
mntmNewMenuItem_25.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent event) {
mntmNewMenuItem_25actionPerformed(event);
}
});
menu_1.add(mntmNewMenuItem_25);
JMenuItem mntmNewMenuItem_26 = new JMenuItem(“画图”);
mntmNewMenuItem_26.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent event) {
mntmNewMenuItem_26actionPerformed(event);
}
});
menu_1.add(mntmNewMenuItem_26);
JMenuItem mntmNewMenuItem_27 = new JMenuItem(“键盘”);
mntmNewMenuItem_27.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent event) {
mntmNewMenuItem_27actionPerformed(event);
}
});
menu_1.add(mntmNewMenuItem_27);
JMenuItem mntmNewMenuItem_28 = new JMenuItem(“记事本”);
mntmNewMenuItem_28.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent event) {
mntmNewMenuItem_28actionPerformed(event);
}
});
menu_1.add(mntmNewMenuItem_28);
JMenuItem mntmNewMenuItem_29 = new JMenuItem(“计算器”);
mntmNewMenuItem_29.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent event) {
mntmNewMenuItem_29actionPerformed(event);
}
});
menu_1.add(mntmNewMenuItem_29);
JMenuItem mntmNewMenuItem_2 = new JMenuItem(“系统信息”);
mntmNewMenuItem_2.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
mntmNewMenuItem_2actionPerformed(e);
}
});
mnNewMenu.add(mntmNewMenuItem_2);
JMenuItem mntmNewMenuItem_3 = new JMenuItem(“系统版本”);
mntmNewMenuItem_3.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
mntmNewMenuItem_3actionPerformed(e);
}
});
mnNewMenu.add(mntmNewMenuItem_3);
JMenuItem mntmNewMenuItem_4 = new JMenuItem(“退出”);
mntmNewMenuItem_4.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent event) {
mntmNewMenuItem_4actionPerformed(event);
}
});
mnNewMenu.add(mntmNewMenuItem_4);
JMenu mnNewMenu_1 = new JMenu(“通知”);
menuBar.add(mnNewMenu_1);
JMenuItem menuItem_1 = new JMenuItem(“管理通知”);
menuItem_1.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
menuItem_1actionPerformed(e);
}
});
mnNewMenu_1.add(menuItem_1);
JMenu mnNewMenu_2 = new JMenu(“成绩管理”);
menuBar.add(mnNewMenu_2);
JMenuItem mntmNewMenuItem_6 = new JMenuItem(“成绩管理”);
mntmNewMenuItem_6.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
mntmNewMenuItem_6actionPerformed(e);
}
});
mnNewMenu_2.add(mntmNewMenuItem_6);
JMenu mnNewMenu_3 = new JMenu(“用户管理”);
menuBar.add(mnNewMenu_3);
JMenuItem menuItem_2 = new JMenuItem(“退出”);
menuItem_2.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
menuItem_2addActionListener(e);
}
});
JMenuItem menuItem_3 = new JMenuItem(“学生管理”);
menuItem_3.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
menuItem_3actionPerformed(e);
}
});
mnNewMenu_3.add(menuItem_3);
JMenuItem mntmNewMenuItem_8 = new JMenuItem(“教师管理”);
mntmNewMenuItem_8.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
mntmNewMenuItem_8actionPerformed(e);
}
});
mnNewMenu_3.add(mntmNewMenuItem_8);
JMenuItem mntmNewMenuItem_7 = new JMenuItem(“教务人员”);
mntmNewMenuItem_7.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
mntmNewMenuItem_7actionPerformed(e);
}
});
mnNewMenu_3.add(mntmNewMenuItem_7);
mnNewMenu_3.add(menuItem_2);
JMenu mnNewMenu_4 = new JMenu(“课程管理”);
menuBar.add(mnNewMenu_4);
自我介绍一下,小编13年上海交大毕业,曾经在小公司待过,也去过华为、OPPO等大厂,18年进入阿里一直到现在。
深知大多数Java工程师,想要提升技能,往往是自己摸索成长或者是报班学习,但对于培训机构动则几千的学费,着实压力不小。自己不成体系的自学效果低效又漫长,而且极易碰到天花板技术停滞不前!
因此收集整理了一份《2024年Java开发全套学习资料》,初衷也很简单,就是希望能够帮助到想自学提升又不知道该从何学起的朋友,同时减轻大家的负担。
既有适合小白学习的零基础资料,也有适合3年以上经验的小伙伴深入学习提升的进阶课程,基本涵盖了95%以上Java开发知识点,真正体系化!
由于文件比较大,这里只是将部分目录截图出来,每个节点里面都包含大厂面经、学习笔记、源码讲义、实战项目、讲解视频,并且会持续更新!
如果你觉得这些内容对你有帮助,可以扫码获取!!(备注Java获取)
总结
虽然我个人也经常自嘲,十年之后要去成为外卖专员,但实际上依靠自身的努力,是能够减少三十五岁之后的焦虑的,毕竟好的架构师并不多。
架构师,是我们大部分技术人的职业目标,一名好的架构师来源于机遇(公司)、个人努力(吃得苦、肯钻研)、天分(真的热爱)的三者协作的结果,实践+机遇+努力才能助你成为优秀的架构师。
如果你也想成为一名好的架构师,那或许这份Java成长笔记你需要阅读阅读,希望能够对你的职业发展有所帮助。
《互联网大厂面试真题解析、进阶开发核心学习笔记、全套讲解视频、实战项目源码讲义》点击传送门即可获取!
MenuItem menuItem_2 = new JMenuItem(“退出”);
menuItem_2.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
menuItem_2addActionListener(e);
}
});
JMenuItem menuItem_3 = new JMenuItem(“学生管理”);
menuItem_3.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
menuItem_3actionPerformed(e);
}
});
mnNewMenu_3.add(menuItem_3);
JMenuItem mntmNewMenuItem_8 = new JMenuItem(“教师管理”);
mntmNewMenuItem_8.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
mntmNewMenuItem_8actionPerformed(e);
}
});
mnNewMenu_3.add(mntmNewMenuItem_8);
JMenuItem mntmNewMenuItem_7 = new JMenuItem(“教务人员”);
mntmNewMenuItem_7.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
mntmNewMenuItem_7actionPerformed(e);
}
});
mnNewMenu_3.add(mntmNewMenuItem_7);
mnNewMenu_3.add(menuItem_2);
JMenu mnNewMenu_4 = new JMenu(“课程管理”);
menuBar.add(mnNewMenu_4);
自我介绍一下,小编13年上海交大毕业,曾经在小公司待过,也去过华为、OPPO等大厂,18年进入阿里一直到现在。
深知大多数Java工程师,想要提升技能,往往是自己摸索成长或者是报班学习,但对于培训机构动则几千的学费,着实压力不小。自己不成体系的自学效果低效又漫长,而且极易碰到天花板技术停滞不前!
因此收集整理了一份《2024年Java开发全套学习资料》,初衷也很简单,就是希望能够帮助到想自学提升又不知道该从何学起的朋友,同时减轻大家的负担。[外链图片转存中…(img-NpAhkUv8-1713343076412)]
[外链图片转存中…(img-e7o1rF5n-1713343076413)]
[外链图片转存中…(img-k5DnLutA-1713343076413)]
既有适合小白学习的零基础资料,也有适合3年以上经验的小伙伴深入学习提升的进阶课程,基本涵盖了95%以上Java开发知识点,真正体系化!
由于文件比较大,这里只是将部分目录截图出来,每个节点里面都包含大厂面经、学习笔记、源码讲义、实战项目、讲解视频,并且会持续更新!
如果你觉得这些内容对你有帮助,可以扫码获取!!(备注Java获取)
总结
虽然我个人也经常自嘲,十年之后要去成为外卖专员,但实际上依靠自身的努力,是能够减少三十五岁之后的焦虑的,毕竟好的架构师并不多。
架构师,是我们大部分技术人的职业目标,一名好的架构师来源于机遇(公司)、个人努力(吃得苦、肯钻研)、天分(真的热爱)的三者协作的结果,实践+机遇+努力才能助你成为优秀的架构师。
如果你也想成为一名好的架构师,那或许这份Java成长笔记你需要阅读阅读,希望能够对你的职业发展有所帮助。
[外链图片转存中…(img-IAnYnEHY-1713343076413)]
《互联网大厂面试真题解析、进阶开发核心学习笔记、全套讲解视频、实战项目源码讲义》点击传送门即可获取!