主页面写好了,InventoryProductManagement是进货管理,SalesProductManagement是销售管理,StockProductManagement是库存管理
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user