-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCheckPackage.java
127 lines (93 loc) · 3.93 KB
/
CheckPackage.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
package TravelingSystem;
import javax.swing.*;
import java.awt.*;
public class CheckPackage extends JFrame {
CheckPackage(){
setBounds(250,100,900,600);
//setLayout(null);
String[] package1={"GOLD PACKAGE", "6 Days 7 Nights","Special Security", "Airport Assistance","Half Day City Tours", "Daily Buffets", "Full day 3 Island Cruise","English Speaking Guide","Book Package","Summer Special","Rs. 20000/-","package1.jpg"};
String[] package2={"SILVER PACKAGE","4 Days 5 Nights","Toll Free"," Entrance Free Tickets", "Meet and Greet at Airport","Welcome Drinks on Arrival","River Rafting","Night Safari","Movie Ticket","Winter Special", "Rs.16000/-","package2.jpg"};
String[] package3={"BRONZE PACKAGE", " 2 Days 3 Nights", "Airtare","Tracking","Horse riding and other games","Swimming Near Camp","DJ Night","River Rafting","Dinner","Winter Special","Rs. 12000/-","package3.jpg"};
JTabbedPane tab=new JTabbedPane();
JPanel p1=createpackage(package1);
tab.addTab("Package 1", null, p1);
JPanel p2=createpackage(package2);
tab.addTab("Package 2", null, p2);
JPanel p3=createpackage(package3);
tab.addTab("Package 3", null, p3);
add(tab);
setVisible(true);
}
public JPanel createpackage(String[] pack){
JPanel p1=new JPanel();
p1.setLayout(null);
p1.setBackground(Color.WHITE);
JLabel l1=new JLabel(pack[0]);
l1.setBounds(30,5,300,30);
l1.setForeground(Color.YELLOW);
l1.setFont(new Font("Tahoma",Font.BOLD,30));
p1.add(l1);
JLabel l2=new JLabel(pack[1]);
l2.setBounds(20,55,300,30);
l2.setForeground(Color.RED);
l2.setFont(new Font("Tahoma",Font.BOLD,20));
p1.add(l2);
JLabel l3=new JLabel(pack[2]);
l3.setBounds(20,95,300,30);
l3.setForeground(Color.BLUE);
l3.setFont(new Font("Tahoma",Font.BOLD,20));
p1.add(l3);
JLabel l4=new JLabel(pack[3]);
l4.setBounds(20,135,300,30);
l4.setForeground(Color.RED);
l4.setFont(new Font("Tahoma",Font.BOLD,20));
p1.add(l4);
JLabel l5=new JLabel(pack[4]);
l5.setBounds(20,175,300,30);
l5.setForeground(Color.BLUE);
l5.setFont(new Font("Tahoma",Font.BOLD,20));
p1.add(l5);
JLabel l6=new JLabel(pack[5]);
l6.setBounds(20,205,350,30);
l6.setForeground(Color.RED);
l6.setFont(new Font("Tahoma",Font.BOLD,20));
p1.add(l6);
JLabel l7=new JLabel(pack[6]);
l7.setBounds(20,245,300,30);
l7.setForeground(Color.BLUE);
l7.setFont(new Font("Tahoma",Font.BOLD,20));
p1.add(l7);
JLabel l8=new JLabel(pack[7]);
l8.setBounds(20,295,300,30);
l8.setForeground(Color.RED);
l8.setFont(new Font("Tahoma",Font.BOLD,20));
p1.add(l8);
JLabel l9=new JLabel(pack[8]);
l9.setBounds(50,410,300,30);
l9.setForeground(Color.BLACK);
l9.setFont(new Font("Tahoma",Font.BOLD,25));
p1.add(l9);
JLabel l10=new JLabel(pack[9]);
l10.setBounds(70,460,300,30);
l10.setForeground(Color.MAGENTA);
l10.setFont(new Font("Tahoma",Font.BOLD,20));
p1.add(l10);
JLabel l11=new JLabel(pack[10]);
l11.setBounds(480,460,300,30);
l11.setForeground(Color.cyan);
l11.setFont(new Font("Tahoma",Font.BOLD,20));
p1.add(l11);
ImageIcon i1=new ImageIcon(ClassLoader.getSystemResource("icons/"+pack[11]));
Image i2=i1.getImage().getScaledInstance(500,300,Image.SCALE_DEFAULT);
ImageIcon i3=new ImageIcon(i2);
JLabel l12=new JLabel(i3);
l12.setBounds(350,20,500,300);
p1.add(l12);
return p1;
}
public static void main(String[] args){
new CheckPackage();
}
}
{
}