Repository navigation
Expand file tree
/
Copy pathloading.java
More file actions
74 lines (57 loc) · 1.97 KB
/
Copy pathloading.java
File metadata and controls
74 lines (57 loc) · 1.97 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
// starting page
import javax.swing.*;
import java.awt.*;
class loading
{
public static JFrame f5=new JFrame("Loading....");
public static JProgressBar pb=new JProgressBar(0,3000); //progress bar
public void load()
{
ImageIcon loadImg=new ImageIcon("G:\\my-java-projects\\images\\loading.png");
ImageIcon bookImg=new ImageIcon("G:\\my-java-projects\\images\\booksearch.png");
JLabel book=new JLabel(bookImg);
JLabel txt=new JLabel("<html>Smart Library 1.01 </html>");
JLabel wait=new JLabel("<html>Please Wait..... </html>");
Container c=f5.getContentPane();
Font fnt=new Font("Arial",Font.BOLD,20);
book.setBounds(120,180,100,100);
f5.add(book);
c.setBackground(new Color(100,200,10,109));
pb.setBounds(70,110,200,30);//progress bar
pb.setStringPainted(true);
pb.setBackground(Color.white);
pb.setForeground(Color.black);
//pb.setValue(0);
f5.add(pb);
txt.setBounds(70,30,200,50);
f5.add(txt);
txt.setForeground(Color.red);
txt.setFont(fnt);
wait.setBounds(100,150,200,20);
f5.add(wait);
f5.setBounds(420,140,350,400);
f5.setIconImage(loadImg.getImage());
f5.setLayout(null);
f5.setDefaultCloseOperation(f5.EXIT_ON_CLOSE);
f5.setResizable(false);
f5.setVisible(true);
int i=0;
while(i<=3000)
{
pb.setValue(i);
i+=20;
try{
Thread.sleep(70);
}catch(Exception e)
{
}
}
}
public static void main (String args[])
{
loading lod=new loading();
lod .load();
f5.setVisible(false);
Home h=new Home();
}
}