-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathProductCategories.java
222 lines (200 loc) · 7.6 KB
/
ProductCategories.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
import java.awt.BorderLayout;
import javax.swing.ImageIcon;
import java.awt.EventQueue;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.SwingConstants;
import javax.swing.border.EmptyBorder;
import java.awt.Color;
import javax.swing.JButton;
import java.awt.Font;
import javax.swing.JLabel;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import java.awt.Image;
public class ProductCategories extends JFrame {
private JPanel contentPane;
/**
* Launch the application.
*/
public static void main(String[] args) {
EventQueue.invokeLater(new Runnable() {
public void run() {
try {
ProductCategories frame = new ProductCategories();
frame.setVisible(true);
} catch (Exception e) {
e.printStackTrace();
}
}
});
}
public void close() {
this.setVisible(false);
this.dispose();
}
/**
* Create the frame.
*/
public ProductCategories() {
setTitle("Product Categories");
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setBounds(100, 100, 530, 376);
contentPane = new JPanel();
contentPane.setBackground(new Color(0, 139, 139));
contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
setContentPane(contentPane);
contentPane.setLayout(null);
JPanel panel = new JPanel();
panel.setBackground(new Color(47, 79, 79));
panel.setForeground(new Color(255, 255, 240));
panel.setBounds(0, 0, 148, 373);
contentPane.add(panel);
panel.setLayout(null);
JLabel lblMenu = new JLabel("Menu");
lblMenu.setForeground(new Color(95, 158, 160));
lblMenu.setFont(new Font("Gill Sans Ultra Bold", Font.BOLD, 19));
lblMenu.setBackground(new Color(47, 79, 79));
lblMenu.setBounds(35, 5, 74, 26);
panel.add(lblMenu);
JButton btnHome = new JButton("Home");
btnHome.setForeground(new Color(0, 0, 0));
btnHome.setToolTipText("");
btnHome.setBackground(new Color(192, 192, 192));
btnHome.setFont(new Font("Tahoma", Font.BOLD, 12));
btnHome.setHorizontalAlignment(SwingConstants.LEFT);
btnHome.setIcon(new ImageIcon(EmployeeDetails.class.getResource("/images/Apps-Home-icon.png")));
btnHome.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
menu mu= new menu();
mu.show();
close();
}
});
btnHome.setBounds(10, 42, 128, 36);
panel.add(btnHome);
JButton btnProduct = new JButton("Product");
btnProduct.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
}
});
btnProduct.setIcon(new ImageIcon(EmployeeDetails.class.getResource("/images/product.png")));
btnProduct.setToolTipText("");
btnProduct.setHorizontalAlignment(SwingConstants.LEFT);
btnProduct.setForeground(Color.BLACK);
btnProduct.setFont(new Font("Tahoma", Font.BOLD, 12));
btnProduct.setBackground(new Color(192, 192, 192));
btnProduct.setBounds(10, 89, 128, 36);
panel.add(btnProduct);
JButton btnSupplier = new JButton("Supplier");
btnSupplier.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
MainSupplier sp = new MainSupplier();
sp.show();
close();
}
});
btnSupplier.setIcon(new ImageIcon(EmployeeDetails.class.getResource("/images/supplier.png")));
btnSupplier.setToolTipText("");
btnSupplier.setHorizontalAlignment(SwingConstants.LEFT);
btnSupplier.setForeground(Color.BLACK);
btnSupplier.setFont(new Font("Tahoma", Font.BOLD, 12));
btnSupplier.setBackground(new Color(192, 192, 192));
btnSupplier.setBounds(10, 134, 128, 36);
panel.add(btnSupplier);
JButton btnCustomer = new JButton("Customer");
btnCustomer.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
}
});
btnCustomer.setIcon(new ImageIcon(EmployeeDetails.class.getResource("/images/customer.png")));
btnCustomer.setToolTipText("");
btnCustomer.setHorizontalAlignment(SwingConstants.LEFT);
btnCustomer.setForeground(Color.BLACK);
btnCustomer.setFont(new Font("Tahoma", Font.BOLD, 11));
btnCustomer.setBackground(new Color(192, 192, 192));
btnCustomer.setBounds(10, 181, 128, 36);
panel.add(btnCustomer);
JButton btnOrder = new JButton("Order");
btnOrder.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
}
});
btnOrder.setIcon(new ImageIcon(EmployeeDetails.class.getResource("/images/sale.png")));
btnOrder.setToolTipText("");
btnOrder.setHorizontalAlignment(SwingConstants.LEFT);
btnOrder.setForeground(Color.BLACK);
btnOrder.setFont(new Font("Tahoma", Font.BOLD, 12));
btnOrder.setBackground(new Color(192, 192, 192));
btnOrder.setBounds(10, 227, 128, 36);
panel.add(btnOrder);
JButton btnInventory = new JButton("Inventory");
btnInventory.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
Inventory in = new Inventory();
in.show();
close();
}
});
btnInventory.setIcon(new ImageIcon(EmployeeDetails.class.getResource("/images/material.png")));
btnInventory.setToolTipText("");
btnInventory.setHorizontalAlignment(SwingConstants.LEFT);
btnInventory.setForeground(Color.BLACK);
btnInventory.setFont(new Font("Tahoma", Font.BOLD, 11));
btnInventory.setBackground(new Color(192, 192, 192));
btnInventory.setBounds(10, 274, 128, 36);
panel.add(btnInventory);
JButton btnEmployee = new JButton("Employee");
btnEmployee.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
EmployeeDetails ed = new EmployeeDetails();
ed.show();
close();
}
});
btnEmployee.setIcon(new ImageIcon(EmployeeDetails.class.getResource("/images/employee.png")));
btnEmployee.setToolTipText("");
btnEmployee.setHorizontalAlignment(SwingConstants.LEFT);
btnEmployee.setForeground(Color.BLACK);
btnEmployee.setFont(new Font("Tahoma", Font.BOLD, 12));
btnEmployee.setBackground(new Color(192, 192, 192));
btnEmployee.setBounds(10, 321, 128, 36);
panel.add(btnEmployee);
JButton btnNewButton = new JButton("Jewellery Sets");
btnNewButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
JewellerySets js = new JewellerySets();
js.setVisible(true);
close();
}
});
// Image img = new ImageIcon(this.getClass().getResource("jss.png")).getImage();
// btnNewButton.setIcon(new ImageIcon(img));
btnNewButton.setForeground(new Color(0, 139, 139));
btnNewButton.setFont(new Font("Poor Richard", Font.BOLD, 18));
btnNewButton.setBackground(new Color(32, 178, 170));
btnNewButton.setBounds(219, 97, 256, 80);
contentPane.add(btnNewButton);
JButton btnEarrings = new JButton("Earrings\r\n");
btnEarrings.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
Earrings er = new Earrings();
er.setVisible(true);
close();
}
});
// Image img1 = new
// ImageIcon(this.getClass().getResource("jumki.jpg")).getImage();
// btnEarrings.setIcon(new ImageIcon(img1));
btnEarrings.setForeground(new Color(0, 139, 139));
btnEarrings.setFont(new Font("Poor Richard", Font.BOLD, 18));
btnEarrings.setBackground(new Color(32, 178, 170));
btnEarrings.setBounds(219, 200, 256, 80);
contentPane.add(btnEarrings);
JLabel lblProductCategories = new JLabel("Product categories");
lblProductCategories.setFont(new Font("Poor Richard", Font.BOLD, 36));
lblProductCategories.setBackground(new Color(32, 178, 170));
lblProductCategories.setBounds(209, 22, 313, 41);
contentPane.add(lblProductCategories);
}
}