-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStark_Industries_SUPERUSER.java
More file actions
242 lines (214 loc) · 10.7 KB
/
Stark_Industries_SUPERUSER.java
File metadata and controls
242 lines (214 loc) · 10.7 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
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package stark.industries;
import javax.swing.JOptionPane;
import java.awt.*;
import java.awt.event.*;
import java.sql.*;
import javax.swing.*;
/**
*
* @author DarkGamerX100
*/
public class Stark_Industries_SUPERUSER extends javax.swing.JFrame {
/**
* Creates new form Stark_Industries_SUPERUSER
*/
public Stark_Industries_SUPERUSER() {
initComponents();
}
/**
* 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")
Statement stmt = null;
ResultSet rs = null;
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
jPanel1 = new javax.swing.JPanel();
btn_MessageAdmin = new javax.swing.JButton();
btn_Add = new javax.swing.JButton();
btn_Terminate = new javax.swing.JButton();
btn_IncSal = new javax.swing.JButton();
btn_DicSal = new javax.swing.JButton();
btn_Mail = new javax.swing.JButton();
btn_Appoint = new javax.swing.JButton();
btn_Contracts = new javax.swing.JButton();
jLabel1 = new javax.swing.JLabel();
btn_Close = new javax.swing.JButton();
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
jPanel1.setLayout(null);
jLabel3.setFont(new java.awt.Font("Arial", 1, 36)); // NOI18N
jLabel3.setForeground(new java.awt.Color(0, 204, 255));
jLabel3.setText("WELCOME");
jPanel1.add(jLabel3);
jLabel3.setBounds(300, 0, 250, 60);
jLabel2.setFont(new java.awt.Font("Yu Gothic Medium", 1, 36)); // NOI18N
jLabel2.setForeground(new java.awt.Color(0, 255, 255));
jLabel2.setText("Welcome Mr. STARK");
jPanel1.add(jLabel2);
jLabel2.setBounds(220, 10, 450, 40);
btn_MessageAdmin.setBackground(new java.awt.Color(51, 51, 51));
btn_MessageAdmin.setFont(new java.awt.Font("Nirmala UI", 1, 13)); // NOI18N
btn_MessageAdmin.setForeground(new java.awt.Color(255, 51, 51));
btn_MessageAdmin.setText("SEND MESSAGE TO MASTER ADMIN");
jPanel1.add(btn_MessageAdmin);
btn_MessageAdmin.setBounds(0, 80, 280, 40);
btn_Add.setBackground(new java.awt.Color(51, 51, 51));
btn_Add.setFont(new java.awt.Font("Nirmala UI", 1, 13)); // NOI18N
btn_Add.setForeground(new java.awt.Color(255, 51, 102));
btn_Add.setText("ADD EMPLOYERS");
jPanel1.add(btn_Add);
btn_Add.setBounds(0, 150, 280, 40);
btn_Terminate.setBackground(new java.awt.Color(51, 51, 51));
btn_Terminate.setFont(new java.awt.Font("Nirmala UI", 1, 13)); // NOI18N
btn_Terminate.setForeground(new java.awt.Color(255, 51, 102));
btn_Terminate.setText("TERMINATE EMPLOYERS");
jPanel1.add(btn_Terminate);
btn_Terminate.setBounds(0, 220, 240, 40);
btn_IncSal.setBackground(new java.awt.Color(51, 51, 51));
btn_IncSal.setFont(new java.awt.Font("Nirmala UI", 1, 13)); // NOI18N
btn_IncSal.setForeground(new java.awt.Color(255, 51, 102));
btn_IncSal.setText("INCREASE SALARY");
jPanel1.add(btn_IncSal);
btn_IncSal.setBounds(0, 290, 240, 40);
btn_DicSal.setBackground(new java.awt.Color(51, 51, 51));
btn_DicSal.setFont(new java.awt.Font("Nirmala UI", 1, 13)); // NOI18N
btn_DicSal.setForeground(new java.awt.Color(255, 51, 102));
btn_DicSal.setText("DICREASE SALARY");
jPanel1.add(btn_DicSal);
btn_DicSal.setBounds(0, 360, 240, 40);
btn_Mail.setBackground(new java.awt.Color(51, 51, 51));
btn_Mail.setFont(new java.awt.Font("Nirmala UI", 1, 13)); // NOI18N
btn_Mail.setForeground(new java.awt.Color(255, 51, 51));
btn_Mail.setText("MAIL");
jPanel1.add(btn_Mail);
btn_Mail.setBounds(600, 150, 190, 50);
btn_Appoint.setBackground(new java.awt.Color(51, 51, 51));
btn_Appoint.setFont(new java.awt.Font("Nirmala UI", 1, 13)); // NOI18N
btn_Appoint.setForeground(new java.awt.Color(255, 51, 51));
btn_Appoint.setText("CHECK APPOINTMENTS");
jPanel1.add(btn_Appoint);
btn_Appoint.setBounds(600, 220, 190, 50);
btn_Withdraw.setBackground(new java.awt.Color(51, 51, 51));
btn_Withdraw.setFont(new java.awt.Font("Nirmala UI", 1, 13)); // NOI18N
btn_Withdraw.setForeground(new java.awt.Color(255, 51, 51));
btn_Withdraw.setText("WITHDRAW FROM TREASURY");
jPanel1.add(btn_Withdraw);
btn_Withdraw.setBounds(600, 290, 220, 40);
btn_Boards.setBackground(new java.awt.Color(51, 51, 51));
btn_Boards.setFont(new java.awt.Font("Nirmala UI", 1, 13)); // NOI18N
btn_Boards.setForeground(new java.awt.Color(255, 51, 51));
btn_Boards.setText(" BOARD MEMBERS ");
jPanel1.add(btn_Boards);
btn_Boards.setBounds(600, 350, 210, 40);
btn_Contracts.setBackground(new java.awt.Color(51, 51, 51));
btn_Contracts.setFont(new java.awt.Font("Nirmala UI", 1, 13)); // NOI18N
btn_Contracts.setForeground(new java.awt.Color(255, 51, 51));
btn_Contracts.setText("CONTRACTS");
jPanel1.add(btn_Contracts);
btn_Contracts.setBounds(600, 80, 190, 50);
jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/stark/industries/E.jpg"))); // NOI18N
jPanel1.add(jLabel1);
jLabel1.setBounds(0, 0, 850, 480);
btn_Close.setMaximumSize(new java.awt.Dimension(32, 32));
btn_Close.setMinimumSize(new java.awt.Dimension(32, 32));
btn_Close.setPreferredSize(new java.awt.Dimension(32, 32));
btn_Close.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btn_CloseActionPerformed(evt);
}
});
jPanel1.add(btn_Close);
btn_Close.setBounds(390, 210, 80, 60);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jPanel1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 852, Short.MAX_VALUE)
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jPanel1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 476, Short.MAX_VALUE)
);
pack();
}// </editor-fold>//GEN-END:initComponents
public static Connection getConnection()
{
Connection connection = null;
try{
Class.forName("com.mysql.jdbc.Driver");
connection= DriverManager.getConnection("jdbc:mysql://localhost:3306/stark_industries","root","stid");
}
catch(Exception ex){
JOptionPane.showMessageDialog(null, "Stark Server Connection Trouble");
}
return connection;
}
private void btn_CloseActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_CloseActionPerformed
// TODO add your handling code here:
JOptionPane.showMessageDialog(null, "BYE");
Stark_Industries_HOME yeg = new Stark_Industries_HOME();
yeg.setVisible(true);
close();
}//GEN-LAST:event_btn_CloseActionPerformed
public void close() {
WindowEvent winClosingEvent = new WindowEvent(this,WindowEvent.WINDOW_CLOSING);
Toolkit.getDefaultToolkit().getSystemEventQueue().postEvent(winClosingEvent);
}
/** WindowEvent winClosingEvent = new WindowEvent(this,WindowEvent.WINDOW_CLOSING);
* @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(Stark_Industries_SUPERUSER.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(Stark_Industries_SUPERUSER.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(Stark_Industries_SUPERUSER.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(Stark_Industries_SUPERUSER.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 Stark_Industries_SUPERUSER().setVisible(true);
}
});
}
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JButton btn_Add;
private javax.swing.JButton btn_Appoint;
public static final transient javax.swing.JButton btn_Boards = new javax.swing.JButton();
private javax.swing.JButton btn_Close;
private javax.swing.JButton btn_Contracts;
private javax.swing.JButton btn_DicSal;
private javax.swing.JButton btn_IncSal;
private javax.swing.JButton btn_Mail;
private javax.swing.JButton btn_MessageAdmin;
private javax.swing.JButton btn_Terminate;
public static final transient javax.swing.JButton btn_Withdraw = new javax.swing.JButton();
private javax.swing.JLabel jLabel1;
public static final transient javax.swing.JLabel jLabel2 = new javax.swing.JLabel();
public static final transient javax.swing.JLabel jLabel3 = new javax.swing.JLabel();
private javax.swing.JPanel jPanel1;
// End of variables declaration//GEN-END:variables
}