-
Notifications
You must be signed in to change notification settings - Fork 5
/
Destination.java
161 lines (132 loc) · 5.78 KB
/
Destination.java
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
package travel_and_Tourism_Organisation_System;
/*
* 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.
*/
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.io.File;
public class Destination extends JFrame implements Runnable {
JLabel l1, l2, l3, l4, l5, l6, l7, l8, l9, l10, l11, l12, l13, l14, l15, l16, l17, l18, l19;
Thread th;
public void run() {
try {
l2.setVisible(true);
Thread.sleep(2800);
l2.setVisible(false);
l3.setVisible(true);
l3.setVisible(true);
Thread.sleep(2800);
l3.setVisible(false);
l4.setVisible(true);
Thread.sleep(2800);
l4.setVisible(false);
l5.setVisible(true);
Thread.sleep(2800);
l5.setVisible(false);
l6.setVisible(true);
Thread.sleep(2800);
l6.setVisible(false);
l7.setVisible(true);
Thread.sleep(2800);
l7.setVisible(false);
l8.setVisible(true);
Thread.sleep(2800);
l8.setVisible(false);
l9.setVisible(true);
Thread.sleep(2800);
l9.setVisible(false);
l10.setVisible(true);
Thread.sleep(2800);
l10.setVisible(false);
l11.setVisible(true);
Thread.sleep(2800);
l11.setVisible(false);
this.setVisible(false);
} catch (Exception e) {
System.out.println(e);
}
}
public Destination() {
setBounds(340,90, 900,580);
getContentPane().setBackground(new Color(220, 250, 250));
setUndecorated(true);
th = new Thread(this);
ImageIcon i1 = new ImageIcon(ClassLoader.getSystemResource("travel_and_Tourism_Organisation_System/icons/dest1.jpeg"));
Image i2 = i1.getImage().getScaledInstance(900, 700, Image.SCALE_DEFAULT);
ImageIcon i3 = new ImageIcon(i2);
l2 = new JLabel(i3);
l2.setBounds(0, 0, 900, 700);
add(l2);
setLayout(null);
ImageIcon i4 = new ImageIcon(ClassLoader.getSystemResource("travel_and_Tourism_Organisation_System/icons/dest2.png"));
Image i5 = i4.getImage().getScaledInstance(900, 700, Image.SCALE_DEFAULT);
ImageIcon i6 = new ImageIcon(i5);
l3 = new JLabel(i4);
l3.setBounds(0, 0, 900, 700);
add(l3);
l3.setVisible(false);
ImageIcon i7 = new ImageIcon(ClassLoader.getSystemResource("travel_and_Tourism_Organisation_System/icons/dest3.jpg"));
Image i8 = i7.getImage().getScaledInstance(900, 700, Image.SCALE_DEFAULT);
ImageIcon i9 = new ImageIcon(i8);
l4 = new JLabel(i9);
l4.setBounds(0, 0, 900, 700);
add(l4);
l4.setVisible(false);
ImageIcon i10 = new ImageIcon(ClassLoader.getSystemResource("travel_and_Tourism_Organisation_System/icons/dest4.jpg"));
Image i11 = i10.getImage().getScaledInstance(900, 700, Image.SCALE_DEFAULT);
ImageIcon i12 = new ImageIcon(i11);
l5 = new JLabel(i12);
l5.setBounds(0, 0, 900, 700);
add(l5);
l5.setVisible(false);
ImageIcon i13 = new ImageIcon(ClassLoader.getSystemResource("travel_and_Tourism_Organisation_System/icons/dest5.jpg"));
Image i14 = i13.getImage().getScaledInstance(900, 700, Image.SCALE_DEFAULT);
ImageIcon i15 = new ImageIcon(i14);
l6 = new JLabel(i15);
l6.setBounds(0, 0, 900, 700);
add(l6);
l6.setVisible(false);
ImageIcon i16 = new ImageIcon(ClassLoader.getSystemResource("travel_and_Tourism_Organisation_System/icons/dest6.jpg"));
Image i17 = i16.getImage().getScaledInstance(900, 700, Image.SCALE_DEFAULT);
ImageIcon i18 = new ImageIcon(i17);
l7 = new JLabel(i18);
l7.setBounds(0, 0, 900, 700);
add(l7);
l7.setVisible(false);
ImageIcon i19 = new ImageIcon(ClassLoader.getSystemResource("travel_and_Tourism_Organisation_System/icons/dest7.jpeg"));
Image i20 = i19.getImage().getScaledInstance(900, 700, Image.SCALE_DEFAULT);
ImageIcon i21 = new ImageIcon(i20);
l8 = new JLabel(i21);
l8.setBounds(0, 0, 900, 700);
add(l8);
l8.setVisible(false);
ImageIcon i22 = new ImageIcon(ClassLoader.getSystemResource("travel_and_Tourism_Organisation_System/icons/dest8.jpg"));
Image i23 = i22.getImage().getScaledInstance(900, 700, Image.SCALE_DEFAULT);
ImageIcon i24 = new ImageIcon(i23);
l9 = new JLabel(i24);
l9.setBounds(0, 0, 900, 700);
add(l9);
l9.setVisible(false);
ImageIcon i25 = new ImageIcon(ClassLoader.getSystemResource("travel_and_Tourism_Organisation_System/icons/dest9.jpg"));
Image i26 = i25.getImage().getScaledInstance(900, 700, Image.SCALE_DEFAULT);
ImageIcon i27 = new ImageIcon(i26);
l10 = new JLabel(i27);
l10.setBounds(0, 0, 900, 700);
add(l10);
l10.setVisible(false);
ImageIcon i28 = new ImageIcon(ClassLoader.getSystemResource("travel_and_Tourism_Organisation_System/icons/dest10.jpg"));
Image i29 = i28.getImage().getScaledInstance(900, 700, Image.SCALE_DEFAULT);
ImageIcon i30 = new ImageIcon(i29);
l11 = new JLabel(i30);
l11.setBounds(0, 0, 900, 700);
add(l11);
l11.setVisible(false);
th.start();
}
public static void main(String args[]) {
new Destination().setVisible(true);
}
}