-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSplash.java
More file actions
55 lines (50 loc) · 1.48 KB
/
Copy pathSplash.java
File metadata and controls
55 lines (50 loc) · 1.48 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
/*
* 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.
*/
/**
*
* @author R.SHANMUKH
*/
package university.management.systems;
import java.awt.*;
import javax.swing.*;
public class Splash{
public static void main(String s[]){
Frame f = new Frame("University Management Systems");
f.setVisible(true);
int i;
int x=1;
for(i=2;i<=600;i+=4,x+=1){
f.setLocation((800-((i+x)/2) ),500-(i/2));
f.setSize(i+3*x,i+x/2);
try{
Thread.sleep(10);
}catch(Exception e) { }
}
}
}
class Frame extends JFrame implements Runnable{
Thread t1;
Frame(String s){
super(s);
setLayout(new FlowLayout());
ImageIcon c1 = new ImageIcon(ClassLoader.getSystemResource("university/management/systems/icons/first.jpg"));
Image i1 = c1.getImage().getScaledInstance(1000, 700,Image.SCALE_DEFAULT);
ImageIcon i2 = new ImageIcon(i1);
JLabel m1 = new JLabel(i2);
add(m1);
t1 = new Thread(this);
t1.start();
}
public void run(){
try{
Thread.sleep(7000);
this.setVisible(false);
Login f1 = new Login();
}catch(Exception e){
e.printStackTrace();
}
}
}