-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSplash.java
More file actions
64 lines (49 loc) · 1.76 KB
/
Splash.java
File metadata and controls
64 lines (49 loc) · 1.76 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
package employee.management.system;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class Splash extends JFrame implements ActionListener {
Splash() {
getContentPane().setBackground(Color.WHITE);
setLayout(null);
JLabel heading = new JLabel("EMPLOYEE MANAGEMENT SYSTEM");
heading.setBounds(80, 30, 1200, 60);
heading.setFont(new Font("serif", Font.PLAIN, 60));
heading.setForeground(Color.RED);
add(heading);
ImageIcon i1 = new ImageIcon(ClassLoader.getSystemResource("icons/front.jpg"));
Image i2 = i1.getImage().getScaledInstance(1100, 700, Image.SCALE_DEFAULT);
ImageIcon i3 = new ImageIcon(i2);
JLabel image = new JLabel(i3);
image.setBounds(50, 100, 1050, 500);
add(image);
JButton clickhere = new JButton("CLICK HERE TO CONTINUE");
clickhere.setBounds(400, 400, 300, 70);
clickhere.setBackground(Color.BLACK);
clickhere.setForeground(Color.WHITE);
clickhere.addActionListener(this);
image.add(clickhere);
setSize(1170, 650);
setLocation(200, 50);
setVisible(true);
while(true) {
heading.setVisible(false);
try {
Thread.sleep(500);
} catch (Exception e){
}
heading.setVisible(true);
try {
Thread.sleep(500);
} catch (Exception e){
}
}
}
public void actionPerformed(ActionEvent ae) {
setVisible(false);
new Login();
}
public static void main(String args[]) {
new Splash();
}
}