diff --git a/.idea/misc.xml b/.idea/misc.xml index 621735e..fdc35ea 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -5,7 +5,6 @@ diff --git a/.idea/uiDesigner.xml b/.idea/uiDesigner.xml new file mode 100644 index 0000000..2b63946 --- /dev/null +++ b/.idea/uiDesigner.xml @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/java/com/example/InventoryProductManagement.java b/src/main/java/com/example/InventoryProductManagement.java new file mode 100644 index 0000000..e8a2b4f --- /dev/null +++ b/src/main/java/com/example/InventoryProductManagement.java @@ -0,0 +1,4 @@ +package com.example; + +public class InventoryProductManagement { +} diff --git a/src/main/java/com/example/Main.java b/src/main/java/com/example/Main.java index 7001f58..2c857d7 100644 --- a/src/main/java/com/example/Main.java +++ b/src/main/java/com/example/Main.java @@ -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(); } } \ No newline at end of file diff --git a/src/main/java/com/example/SalesProductManagement.java b/src/main/java/com/example/SalesProductManagement.java new file mode 100644 index 0000000..a013527 --- /dev/null +++ b/src/main/java/com/example/SalesProductManagement.java @@ -0,0 +1,4 @@ +package com.example; + +public class SalesProductManagement { +} diff --git a/src/main/java/com/example/StockProductManagement.java b/src/main/java/com/example/StockProductManagement.java new file mode 100644 index 0000000..1cf5ed7 --- /dev/null +++ b/src/main/java/com/example/StockProductManagement.java @@ -0,0 +1,18 @@ +package com.example; + +import javax.swing.*; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; + +public class StockProductManagement extends JFrame implements ActionListener { + + StockProductManagement() { + super("库存商品信息管理"); + setBounds(100,100,500,500); + setVisible(true); + } + @Override + public void actionPerformed(ActionEvent e) { + + } +}