主页面写好了,InventoryProductManagement是进货管理,SalesProductManagement是销售管理,StockProductManagement是库存管理

This commit is contained in:
lu
2025-09-09 16:07:09 +08:00
parent 5169f1c5f5
commit e9b227f8b5
6 changed files with 191 additions and 5 deletions

View File

@@ -1,9 +1,46 @@
package com.example;
public class Main {
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
public class Main extends JFrame implements ActionListener {
JButton jb1,jb2,jb3;
Main(){
super("超市进销存信息管理系统");
jb1=new JButton("进货商品信息");
jb2=new JButton("销售商品信息");
jb3=new JButton("库存商品信息");
jb1.addActionListener(this);
jb2.addActionListener(this);
jb3.addActionListener(this);
setLayout(new GridLayout(3,3));
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
add(jb1);
add(jb2);
add(jb3);
setBounds(100,100,500,500);
setVisible(true);
}
@Override
public void actionPerformed(ActionEvent e) {
if(e.getSource()==jb1){
new InventoryProductManagement();//进入进货商品信息管理系统
setVisible(false);
}else if(e.getSource()==jb2){
new SalesProductManagement();//进入销售商品信息管理系统
setVisible(false);
}else if(e.getSource()==jb3){
new StockProductManagement();//进入库存商品信息管理系统
setVisible(false);
}
}
public static void main(String[] args) {
System.out.println("第一个小您过目");
new Main();
}
}