实例介绍
【实例简介】Java,sql编写的仓库管理系统,附加数据库后 ,登录账号:wyt 密码:001
系统介绍
三只松鼠超市管理系统是一款辅助超市管理员管理超市的实用性项目,根据超市的日常管理需要,超市管理系统应包括基本档案管理、采购订货管理、仓库入库管理、仓库出库管理、人员管理、部门管理6大功能。其中基本档案管理又分为供货商管理、销售商管理、货品档案管理、仓库管理,为管理员提供日常基本信息的功能,采购订货管理模块,用来对日常的采购订货信息进行管理,仓库入库管理,管理各种商品入库的信息,仓库出库管理,管理商品出库记录,人员管理,实现对员工的管理,部门管理实现对超市的各个独立部门进行管理。
操作流程
(1)进入主窗体可通过主窗体中的功能导航菜单进入“基本档案”管理子模块,在基本档案管理模块中又包含“供货商管理”、“销售商管理”、“货品档案管理”、“仓库管理”功能。
(2)当用户单击主窗体中功能导航菜单中的“采购订货”按钮,可进入采购订货子模块。
(3)主窗体的功能导航菜单中还包含有“仓库入库”、“仓库出库”、“人员管理”、“部门管理”内容。
(4)每一个模块都实现了其添加、删除、修改功能。便于进行管理。
【实例截图】
【核心代码】
package com.szss.main; import java.awt.EventQueue; import java.awt.Image; import java.awt.Point; import javax.swing.JFrame; import javax.swing.JPanel; import javax.swing.border.EmptyBorder; import com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel; import com.szss.bean.User; import com.szss.dao.UserDao; import com.szss.mainFrame.RemoveButtomFrame; import com.szss.util.Session; import javax.swing.ImageIcon; import javax.swing.JLabel; import javax.swing.JOptionPane; import javax.swing.JTextField; import javax.swing.JPasswordField; import javax.swing.JButton; import javax.swing.SwingUtilities; import javax.swing.UIManager; import java.awt.event.ActionListener; import java.awt.event.ActionEvent; import java.awt.event.MouseAdapter; import java.awt.event.MouseMotionAdapter; import java.io.Serializable; import java.net.URL; public class Enter extends JFrame { private BackgroundPanel contentPane; private JTextField userNameTextField; private JPasswordField passwordField; private Point spoint; /** * Launch the application. */ public static void main(String[] args) { EventQueue.invokeLater(new Runnable() { public void run() { try { UIManager.setLookAndFeel(new NimbusLookAndFeel()); SwingUtilities.invokeLater(new Runnable() { public void run() { Enter mostly = new Enter(); mostly.setVisible(true); } }); } catch (Exception e) { e.printStackTrace(); } } }); } /** * Create the frame. */ public Enter() { setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); setResizable(false); setLocationRelativeTo(null);// 窗体居中 setTitle("登录窗体"); setBounds(100, 100, 559, 285); contentPane = getLoginPanel(); contentPane.setBorder(new EmptyBorder(5, 5, 5, 5)); setContentPane(contentPane); contentPane.setLayout(null); } /** * 初始化登录面板 * * @return */ private BackgroundPanel getLoginPanel() { if (contentPane == null) { contentPane = new BackgroundPanel();// 创建登录面板对象 contentPane.setOpaque(false);// 面板透明 contentPane.setImage(getToolkit().getImage( getClass().getResource("login.png")));// 设置面板背景图片 contentPane.setLayout(null); JLabel userNameLabel = new JLabel("用户名:"); userNameLabel.setBounds(40, 116, 54, 15); contentPane.add(userNameLabel); userNameTextField = new JTextField(); userNameTextField.setBounds(92, 113, 139, 25); contentPane.add(userNameTextField); userNameTextField.setColumns(10); JLabel passWordLabel = new JLabel("密 码:"); passWordLabel.setBounds(40, 158, 54, 15); contentPane.add(passWordLabel); passwordField = new JPasswordField(); passwordField.setBounds(92, 155, 139, 25); contentPane.add(passwordField); JButton enterButton = new JButton(""); URL url = getClass().getResource("enter.png"); ImageIcon imageIcon = new ImageIcon(url); enterButton.setBounds(0, 40,imageIcon.getIconWidth(), imageIcon.getIconHeight()); enterButton.setIcon(imageIcon); enterButton.setContentAreaFilled(false); // 取消填充区域 enterButton.setBorder(null); // 取消边框 enterButton.addActionListener(new ActionListener() { //按钮的单击事件 public void actionPerformed(ActionEvent e) { UserDao userDao = new UserDao(); //创建保存有操作数据库类对象 User user = userDao.getUser(userNameTextField.getText(),passwordField.getText()); //以用户添加的用户名与密码为参数调用查询用户方法 if(user.getId()>0){ //判断用户编号是否大于0 Session.setUser(user); //设置Session对象的User属性值 RemoveButtomFrame frame = new RemoveButtomFrame(); //创建主窗体对象 frame.setVisible(true); //显示主窗体 Enter.this.dispose(); //销毁登录窗体 } else{ //如果用户输入的用户名与密码错误 JOptionPane.showMessageDialog(getContentPane(), "用户名或密码错误"); //给出提示信息 userNameTextField.setText(""); //用户名文本框设置为空 passwordField.setText(""); //密码文本框设置为空 } } }); enterButton.setBounds(253, 116, 93, 64); contentPane.add(enterButton); URL urlclose = getClass().getResource("close.png"); ImageIcon imageIconclose = new ImageIcon(urlclose); // 添加鼠标事件监听器 contentPane.addMouseListener(new TitleMouseAdapter()); // 添加鼠标动作监听器 } return contentPane; } private final class TitleMouseAdapter extends MouseAdapter implements Serializable { public void mousePressed(java.awt.event.MouseEvent e) { spoint = e.getPoint(); } } }
相关软件
网友评论
小贴士
感谢您为本站写下的评论,您的评论对其它用户来说具有重要的参考价值,所以请认真填写。
- 类似“顶”、“沙发”之类没有营养的文字,对勤劳贡献的楼主来说是令人沮丧的反馈信息。
- 相信您也不想看到一排文字/表情墙,所以请不要反馈意义不大的重复字符,也请尽量不要纯表情的回复。
- 提问之前请再仔细看一遍楼主的说明,或许是您遗漏了。
- 请勿到处挖坑绊人、招贴广告。既占空间让人厌烦,又没人会搭理,于人于己都无利。
关于好例子网
本站旨在为广大IT学习爱好者提供一个非营利性互相学习交流分享平台。本站所有资源都可以被免费获取学习研究。本站资源来自网友分享,对搜索内容的合法性不具有预见性、识别性、控制性,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,平台无法对用户传输的作品、信息、内容的权属或合法性、安全性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论平台是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二与二十三条之规定,若资源存在侵权或相关问题请联系本站客服人员,点此联系我们。关于更多版权及免责申明参见 版权及免责申明
支持(0) 盖楼(回复)
支持(0) 盖楼(回复)