-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathCheckPackage.java
111 lines (88 loc) · 4.38 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
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 java.sql.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class CheckPackage extends JFrame{
public static void main(String[] args) {
new CheckPackage().setVisible(true);
}
CheckPackage() {
setBounds(350,100, 900, 565);
setVisible(true);
String[] package1 = new String[]{"package1.jpg","GOLD PACKAGE","6 days and 7 Nights", "Airport Assistance at Aiport", "Half Day City Tour", "Welcome drinks on Arrival", "Daily Buffet", "Full Day 3 Island Cruise", "English Speaking Guide", "BOOK NOW", "Summer Special", "Rs 12000 only"};
String[] package2 = new String[]{"package2.jpg","SILVER PACKAGE","4 days and 3 Nights", "Toll Free and Entrance Free Tickets", "Meet and Greet at Aiport", "Welcome drinks on Arrival", "Night Safari", "Full Day 3 Island Cruise", "Cruise with Dinner", "BOOK NOW", "Winter Special", "Rs 25000 only"};
String[] package3 = new String[]{"package3.jpg","BRONZE PACKAGE","6 days and 5 Nights", "Return Airfare", "Free Clubbing, Horse Riding & other Games", "Welcome drinks on Arrival", "Daily Buffet", "Stay in 5 Star Hotel", "BBQ Dinner", "BOOK NOW", "Winter Special", "Rs 32000 only"};
JTabbedPane tabbedPane = new JTabbedPane();
JPanel p1 = createPackage(package1);
tabbedPane.addTab("Package 1", null, p1);
JPanel p2 = createPackage(package2);
tabbedPane.addTab("Package 2", null, p2);
JPanel p3 = createPackage(package3);
tabbedPane.addTab("Package 3", null, p3);
add(tabbedPane, BorderLayout.CENTER);
}
public JPanel createPackage(String[] pack){
JPanel p1 = new JPanel();
p1.setLayout(null);
p1.setBackground(Color.cyan);
ImageIcon i1 = new ImageIcon(ClassLoader.getSystemResource("travel_and_Tourism_Organisation_System/icons/"+pack[0]));
Image i3 = i1.getImage().getScaledInstance(550, 300,Image.SCALE_DEFAULT);
ImageIcon i2 = new ImageIcon(i3);
JLabel l1 = new JLabel(i2);
l1.setBounds(400,0,450,420);
p1.add(l1);
JLabel lblName = new JLabel(pack[1]);
lblName.setFont(new Font("Yu Mincho", Font.PLAIN, 30));
lblName.setBounds(50, 5, 350, 53);
p1.add(lblName);
JLabel l3 = new JLabel(pack[2]);
l3.setForeground(Color.RED);
l3.setBounds(35, 70, 200, 14);
p1.add(l3);
JLabel lblId = new JLabel(pack[3]);
lblId.setForeground(Color.BLUE);
lblId.setBounds(35, 110, 250, 14);
p1.add(lblId);
JLabel l2 = new JLabel(pack[4]);
l2.setForeground(Color.RED);
l2.setBounds(35, 150, 300, 14);
p1.add(l2);
JLabel lblName_1 = new JLabel(pack[5]);
lblName_1.setForeground(Color.BLUE);
lblName_1.setBounds(35, 190,200, 14);
p1.add(lblName_1);
JLabel lblGender = new JLabel(pack[6]);
lblGender.setForeground(Color.RED);
lblGender.setBounds(35, 230, 200, 14);
p1.add(lblGender);
JLabel lblCountry = new JLabel(pack[7]);
lblCountry.setForeground(Color.BLUE);
lblCountry.setBounds(35, 270, 200, 14);
p1.add(lblCountry);
JLabel lblReserveRoomNumber = new JLabel(pack[8]);
lblReserveRoomNumber.setForeground(Color.RED);
lblReserveRoomNumber.setBounds(35, 310, 200, 14);
p1.add(lblReserveRoomNumber);
JLabel lblCheckInStatus = new JLabel(pack[9]);
lblCheckInStatus.setForeground(Color.BLUE);
lblCheckInStatus.setFont(new Font("Yu Mincho", Font.PLAIN, 20));
lblCheckInStatus.setBounds(35, 400, 200, 30);
p1.add(lblCheckInStatus);
JLabel lblDeposite = new JLabel(pack[10]);
lblDeposite.setFont(new Font("Yu Mincho", Font.PLAIN, 30));
lblDeposite.setBounds(35, 460, 400, 40);
p1.add(lblDeposite);
JLabel la1 = new JLabel(pack[11]);
la1.setForeground(Color.RED);
la1.setFont(new Font("Yu Mincho", Font.PLAIN, 30));
la1.setBounds(600, 460, 400, 40);
p1.add(la1);
return p1;
}
}