-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbasebody.java
More file actions
320 lines (283 loc) · 14.5 KB
/
basebody.java
File metadata and controls
320 lines (283 loc) · 14.5 KB
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
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/*
* basebody.java
*
* Created on 11 20, 18, 8:43:36 PM
*/
package payrollsystem;
/**
*
* @author user 2
*/
import java.awt.Toolkit;
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JOptionPane;
public class basebody extends javax.swing.JFrame {
public basebody() {
initComponents();
setIcon();
}
/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
jPanel1 = new javax.swing.JPanel();
jPanel3 = new javax.swing.JPanel();
jPanel4 = new javax.swing.JPanel();
jLabel1 = new javax.swing.JLabel();
jLabel14 = new javax.swing.JLabel();
jLabel15 = new javax.swing.JLabel();
jLabel16 = new javax.swing.JLabel();
jLabel17 = new javax.swing.JLabel();
jLabel13 = new javax.swing.JLabel();
jButton4 = new javax.swing.JButton();
jButton3 = new javax.swing.JButton();
jPanel2 = new javax.swing.JPanel();
jButton6 = new javax.swing.JButton();
jButton5 = new javax.swing.JButton();
jLabel18 = new javax.swing.JLabel();
jLabel19 = new javax.swing.JLabel();
jButton2 = new javax.swing.JButton();
jButton1 = new javax.swing.JButton();
jLabel11 = new javax.swing.JLabel();
jLabel10 = new javax.swing.JLabel();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setUndecorated(true);
getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());
jPanel1.setBackground(new java.awt.Color(0, 51, 51));
jPanel1.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());
jPanel3.setBackground(new java.awt.Color(0, 51, 51));
jPanel3.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());
jPanel4.setBackground(new java.awt.Color(255, 0, 51));
jPanel4.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));
jPanel4.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());
jLabel1.setFont(new java.awt.Font("Verdana", 1, 18));
jLabel1.setForeground(new java.awt.Color(255, 255, 255));
jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
jLabel1.setText("X");
jLabel1.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
jLabel1MouseClicked(evt);
}
});
jPanel4.add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 30, 30));
jPanel3.add(jPanel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(670, 0, 30, 30));
jPanel3.add(jLabel14, new org.netbeans.lib.awtextra.AbsoluteConstraints(610, 10, 50, 40));
jPanel3.add(jLabel15, new org.netbeans.lib.awtextra.AbsoluteConstraints(170, 10, 50, 40));
jPanel3.add(jLabel16, new org.netbeans.lib.awtextra.AbsoluteConstraints(440, 10, 50, 40));
jPanel3.add(jLabel17, new org.netbeans.lib.awtextra.AbsoluteConstraints(260, 80, 50, 40));
jPanel1.add(jPanel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 700, 30));
jPanel1.add(jLabel13, new org.netbeans.lib.awtextra.AbsoluteConstraints(50, 240, 40, 40));
jButton4.setBackground(new java.awt.Color(0, 102, 102));
jButton4.setFont(new java.awt.Font("Calibri", 1, 18));
jButton4.setForeground(new java.awt.Color(255, 255, 255));
jButton4.setText("SEARCH");
jButton4.setBorder(null);
jButton4.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/server (1).png"))); // NOI18N
jButton4.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton4ActionPerformed(evt);
}
});
jPanel1.add(jButton4, new org.netbeans.lib.awtextra.AbsoluteConstraints(400, 120, 180, 70));
jButton3.setBackground(new java.awt.Color(0, 102, 102));
jButton3.setFont(new java.awt.Font("Calibri", 1, 18));
jButton3.setForeground(new java.awt.Color(255, 255, 255));
jButton3.setText("DATABASE");
jButton3.setBorder(null);
jButton3.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/server.png"))); // NOI18N
jButton3.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton3ActionPerformed(evt);
}
});
jPanel1.add(jButton3, new org.netbeans.lib.awtextra.AbsoluteConstraints(140, 120, 180, 70));
jPanel2.setBackground(new java.awt.Color(0, 51, 51));
jPanel2.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());
jButton6.setBackground(new java.awt.Color(0, 102, 102));
jButton6.setFont(new java.awt.Font("Calibri", 1, 18));
jButton6.setForeground(new java.awt.Color(255, 255, 255));
jButton6.setText("EXIT");
jButton6.setBorder(null);
jButton6.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/exit.png"))); // NOI18N
jButton6.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton6ActionPerformed(evt);
}
});
jPanel2.add(jButton6, new org.netbeans.lib.awtextra.AbsoluteConstraints(140, 100, 180, 70));
jButton5.setBackground(new java.awt.Color(0, 102, 102));
jButton5.setFont(new java.awt.Font("Calibri", 1, 18));
jButton5.setForeground(new java.awt.Color(255, 255, 255));
jButton5.setText("LOG OUT");
jButton5.setBorder(null);
jButton5.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/login.png"))); // NOI18N
jButton5.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton5ActionPerformed(evt);
}
});
jPanel2.add(jButton5, new org.netbeans.lib.awtextra.AbsoluteConstraints(400, 100, 180, 70));
jLabel18.setBackground(new java.awt.Color(0, 102, 102));
jLabel18.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/basebody.png"))); // NOI18N
jPanel2.add(jLabel18, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, -200, -1, -1));
jPanel2.add(jLabel19, new org.netbeans.lib.awtextra.AbsoluteConstraints(330, 160, 40, 40));
jButton2.setBackground(new java.awt.Color(0, 102, 102));
jButton2.setFont(new java.awt.Font("Calibri", 1, 18));
jButton2.setForeground(new java.awt.Color(255, 255, 255));
jButton2.setText("CALCULATOR");
jButton2.setBorder(null);
jButton2.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/calculator.png"))); // NOI18N
jButton2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton2ActionPerformed(evt);
}
});
jPanel2.add(jButton2, new org.netbeans.lib.awtextra.AbsoluteConstraints(140, 10, 180, 70));
jButton1.setBackground(new java.awt.Color(0, 102, 102));
jButton1.setFont(new java.awt.Font("Calibri", 1, 18));
jButton1.setForeground(new java.awt.Color(255, 255, 255));
jButton1.setText("NOTEPAD");
jButton1.setBorder(null);
jButton1.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/notes.png"))); // NOI18N
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});
jPanel2.add(jButton1, new org.netbeans.lib.awtextra.AbsoluteConstraints(400, 10, 180, 70));
jPanel1.add(jPanel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 200, 700, 250));
jLabel11.setFont(new java.awt.Font("Footlight MT Light", 1, 48)); // NOI18N
jLabel11.setForeground(new java.awt.Color(255, 255, 255));
jLabel11.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
jLabel11.setText("CashSEA");
jPanel1.add(jLabel11, new org.netbeans.lib.awtextra.AbsoluteConstraints(280, 40, 200, 70));
jLabel10.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/logo.png"))); // NOI18N
jPanel1.add(jLabel10, new org.netbeans.lib.awtextra.AbsoluteConstraints(190, 30, 90, 80));
getContentPane().add(jPanel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 710, 460));
java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
setBounds((screenSize.width-702)/2, (screenSize.height-450)/2, 702, 450);
}// </editor-fold>//GEN-END:initComponents
private void jLabel1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLabel1MouseClicked
int YesOrNo = JOptionPane.showConfirmDialog(null,"Are sure you want to Quit","Quit", JOptionPane.YES_NO_OPTION);
if(YesOrNo == 0)
{
System.exit(0);
}
}//GEN-LAST:event_jLabel1MouseClicked
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
ProcessBuilder pb =new ProcessBuilder("Notepad.exe");
try {
pb.start();
} catch (IOException ex) {
Logger.getLogger(basebody.class.getName()).log(Level.SEVERE, null, ex);
}
}//GEN-LAST:event_jButton1ActionPerformed
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
Runtime rtime =Runtime.getRuntime();
try {
rtime.exec("calc");
} catch (IOException ex) {
Logger.getLogger(basebody.class.getName()).log(Level.SEVERE, null, ex);
}
}//GEN-LAST:event_jButton2ActionPerformed
private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed
Main l = new Main();
int YesOrNo = JOptionPane.showConfirmDialog(null,"Time To Work","Database", JOptionPane.YES_NO_OPTION);
if(YesOrNo == 0)
{
l.show();
this.hide();
}
}//GEN-LAST:event_jButton3ActionPerformed
private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton4ActionPerformed
Search l = new Search();
int YesOrNo = JOptionPane.showConfirmDialog(null,"Time To Update","Update Time", JOptionPane.YES_NO_OPTION);
if(YesOrNo == 0)
{
l.show();
this.hide();
}
}//GEN-LAST:event_jButton4ActionPerformed
private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton5ActionPerformed
Login l = new Login();
int YesOrNo = JOptionPane.showConfirmDialog(null,"Return to Login","Return", JOptionPane.YES_NO_OPTION);
if(YesOrNo == 0)
{
l.show();
this.hide();
}
}//GEN-LAST:event_jButton5ActionPerformed
private void jButton6ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton6ActionPerformed
int YesOrNo = JOptionPane.showConfirmDialog(null,"Are sure you want to Quit","Quit", JOptionPane.YES_NO_OPTION);
if(YesOrNo == 0) {
System.exit(0);
}
}//GEN-LAST:event_jButton6ActionPerformed
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
/* Set the Nimbus look and feel */
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
* For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
*/
try {
for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException ex) {
java.util.logging.Logger.getLogger(basebody.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(basebody.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(basebody.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(basebody.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
}
//</editor-fold>
/* Create and display the form */
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new basebody().setVisible(true);
}
});
}
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JButton jButton1;
private javax.swing.JButton jButton2;
private javax.swing.JButton jButton3;
private javax.swing.JButton jButton4;
private javax.swing.JButton jButton5;
private javax.swing.JButton jButton6;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel10;
private javax.swing.JLabel jLabel11;
private javax.swing.JLabel jLabel13;
private javax.swing.JLabel jLabel14;
private javax.swing.JLabel jLabel15;
private javax.swing.JLabel jLabel16;
private javax.swing.JLabel jLabel17;
private javax.swing.JLabel jLabel18;
private javax.swing.JLabel jLabel19;
private javax.swing.JPanel jPanel1;
private javax.swing.JPanel jPanel2;
private javax.swing.JPanel jPanel3;
private javax.swing.JPanel jPanel4;
// End of variables declaration//GEN-END:variables
private void setIcon() {
setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource("pay.png")));
}}