手机版

数据库课程设计—商品销售管理系统

时间:2025-04-22   来源:未知    
字号:

精品资料

import java.awt.event.*;

import java.awt.*;

import javax.swing.*;

import java.sql.*;

import javax.swing.table.AbstractTableModel;

public class LoginBackPanel extends JFrame implements ActionListener{ private static final long serialVersionUID = 1L;

JButton button1,button2;

JTextField F1;

Choice c;

Container ct = getContentPane();

public LoginBackPanel(String str){

super(str);

setBak();

JPanel panel = new JPanel();

panel.setOpaque(false);

ct.add(panel);

panel.setLayout(new FlowLayout(FlowLayout.CENTER,60,20));

c = new Choice();

c.add(" Boss ");

c.add(" Salesman ");

JLabel J1 = new JLabel("验证身份:");

JLabel J2 = new JLabel("登录密码:");

F1 = new JTextField(9);

button1 = new JButton("登录");

button2 = new JButton("退出");

button1.addActionListener(this);

button2.addActionListener(this);

panel.add(J1);

panel.add(c);

panel.add(J2);

panel.add(F1);

panel.add(button1);

panel.add(button2);

add(panel);

}

public void setBak(){ //设置背景方法((JPanel)this.getContentPane()).setOpaque(false);

ImageIcon img = new ImageIcon("e://数据库课程设计//六月物语.jpg");

JLabel background = new JLabel(img);

this.getLayeredPane().add(background, new Integer(Integer.MIN_VALUE));

background.setBounds(0, 0, img.getIconWidth(), img.getIconHeight());

}

可编辑修改

精品资料

public void actionPerformed(ActionEvent e){

if(e.getSource()==button1){

if(c.getSelectedItem().equals(" Boss ")&&F1.getText().equals("boss")){

this.dispose();

BS bs=new BS("管理员界面");

bs.setSize(500,250);

bs.setLocation(450,250);

bs.setVisible(true);

}

if(c.getSelectedItem().equals(" Salesman ")&&F1.getText().equals("salesman")){

this.dispose();

SL sl=new SL("销售员界面");

sl.setSize(500,250);

sl.setLocation(450,250);

sl.setVisible(true);

}

}

if(e.getSource()==button2){

System.exit(0);

}

}

public static void main(String[]args){

LoginBackPanel lgp=new LoginBackPanel("管理系统登录");

lgp.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

lgp.setSize(300,200);

lgp.setLocation(550,250);

lgp.setVisible(true);

}

}

可编辑修改

精品资料

class BS extends JFrame implements ActionListener{

JButton B1,B2,B3,B4,B5,B6,B7;

Container ct = getContentPane();

public BS(String str){

super(str);

setBak();

JPanel JP = new JPanel();

JP.setOpaque(false);

ct.add(JP);

JP.setLayout(new FlowLayout(FlowLayout.CENTER,30,50));

B1 = new JButton("销售情况");

B2 = new JButton("客户退货");

B3 = new JButton("销售收款");

B4 = new JButton("客户信息");

B5 = new JButton("员工管理");

B6 = new JButton("进货信息");

B7 = new JButton("更换角色");

B1.addActionListener(this);

B2.addActionListener(this);

B3.addActionListener(this);

B4.addActionListener(this);

B5.addActionListener(this);

B6.addActionListener(this);

B7.addActionListener(this);

JP.add(B1);

JP.add(B2);

JP.add(B3);

JP.add(B4);

JP.add(B5);

JP.add(B6);

JP.add(B7);

add(JP);

可编辑修改

精品资料

}

public void setBak(){

((JPanel)this.getContentPane()).setOpaque(false);

ImageIcon img = new ImageIcon("e://数据库课程设计//六月物语1.jpg");

JLabel background = new JLabel(img);

this.getLayeredPane().add(background, new Integer(Integer.MIN_VALUE));

background.setBounds(0, 0, img.getIconWidth(), img.getIconHeight());

}

public void actionPerformed(ActionEvent e){

if(e.getSource()==B1){

this.dispose();

CXFPXX cxfpxx = new CXFPXX("日常销售—【发票情况】");

cxfpxx.setSize(700,300);

cxfpxx.setLocation(350,250);

cxfpxx.setVisible(true);

}

if(e.getSource()==B2){

this.dispose();

XSTHXX xsthxx = new XSTHXX("日常销售—【销售退货】");

xsthxx.setSize(700,300);

xsthxx.setLocation(350,250);

xsthxx.setVisible(true);

}

if(e.getSource()==B3){

this.dispose();

XSXXCX xsxxcx = new XSXXCX("日常销售—【销售收款】");

xsxxcx.setSize(700,300);

xsxxcx.setLocation(350,250);

xsxxcx.setVisible(true);

}

if(e.getSource()==B4){

this.dispose();

HYXXCX hyxxcx = new HYXXCX("基本信息管理—【会员信息】");

hyxxcx.setSize(700,300);

hyxxcx.setLocation(350,250);

hyxxcx.setVisible(true);

}

if(e.getSource()==B5){

this.dispose();

YGGL yggl = new YGGL("员工管理—【员工信息】");

yggl.setSize(500,200);

yggl.setLocation(450,250);

yggl.setVisible(true);

可编辑修改

精品资料

}

if(e.getSource()==B6){

this.dispose();

JHXX jhxx = new JHXX("商品更新—【进货信息】");

jhxx.setSize(300,150);

jhxx.setLocation(500,250);

jhxx.setVisible(true);

}

if(e.getSource()==B7){

this.dispose();

LoginBackPanel xt = new LoginBackPanel("管理系统登录");

xt.setSize(300,200);

xt.setLocation(550,250);

xt.setVisible(true);

}

}

}

class BG2 extends AbstractTableModel{

String rq,ph,mc,bh,dj,sl,je;

final Strin …… 此处隐藏:3611字,全部文档内容请下载后查看。喜欢就下载吧 ……

数据库课程设计—商品销售管理系统.doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印
    ×
    二维码
    × 游客快捷下载通道(下载后可以自由复制和排版)
    VIP包月下载
    特价:29 元/月 原价:99元
    低至 0.3 元/份 每月下载150
    全站内容免费自由复制
    VIP包月下载
    特价:29 元/月 原价:99元
    低至 0.3 元/份 每月下载150
    全站内容免费自由复制
    注:下载文档有可能出现无法下载或内容有问题,请联系客服协助您处理。
    × 常见问题(客服时间:周一到周五 9:30-18:00)