-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathContactPage.java
More file actions
151 lines (124 loc) · 4.42 KB
/
ContactPage.java
File metadata and controls
151 lines (124 loc) · 4.42 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
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
package HotelDemo;
import java.awt.EventQueue;
import javax.imageio.ImageIO;
import javax.swing.BorderFactory;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import java.awt.Label;
import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.Image;
import java.awt.ScrollPane;
import java.awt.List;
import javax.swing.JList;
import java.awt.Button;
import java.awt.event.ActionListener;
import java.io.File;
import java.io.IOException;
import java.awt.event.ActionEvent;
public class ContactPage extends JFrame {
// private static final long serialVersionUID = 1L;
private JPanel contentPane;
/**
* Launch the application.
*/
public static void main(String[] args) {
EventQueue.invokeLater(new Runnable() {
public void run() {
try {
ContactPage frame = new ContactPage();
frame.setVisible(true);
frame.setSize(1400, 1200);
} catch (Exception e) {
e.printStackTrace();
}
}
});
}
/**
* Create the frame.
*/
public ContactPage() {
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setBounds(00, 00, 961, 737);
contentPane = new JPanel();
contentPane.setToolTipText("");
contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
setContentPane(contentPane);
contentPane.setLayout(null);
BackgroundPanel contentPane = new BackgroundPanel("C:\\\\Users\\\\randa\\\\second_year_B29\\\\DataBaseDemo\\\\src\\\\HotelDemo\\\\cbg.jpg");
contentPane.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
setContentPane(contentPane);
contentPane.setLayout(null);
JLabel label = new JLabel("Contact_Details ");
label.setFont(new Font("Times New Roman", Font.BOLD, 45));
label.setForeground(new Color(148, 0, 211));
label.setBounds(506, 71, 335, 66);
contentPane.add(label);
JLabel label_1 = new JLabel("Email :");
label_1.setFont(new Font("Times New Roman", Font.PLAIN, 30));
label_1.setForeground(new Color(0, 0, 255));
label_1.setBounds(425, 200, 152, 45);
contentPane.add(label_1);
label_2.setFont(new Font("Times New Roman", Font.PLAIN, 15));
label_2.setBounds(639, 208, 313, 37);
contentPane.add(label_2);
label_3.setFont(new Font("Times New Roman", Font.PLAIN, 15));
label_3.setBounds(639, 261, 313, 37);
contentPane.add(label_3);
label_4.setFont(new Font("Times New Roman", Font.PLAIN, 15));
label_4.setBounds(639, 311, 313, 37);
contentPane.add(label_4);
JLabel label_5 = new JLabel("Mobile No :");
label_5.setForeground(new Color(0, 0, 255));
label_5.setFont(new Font("Times New Roman", Font.PLAIN, 30));
label_5.setBounds(425, 394, 152, 45);
contentPane.add(label_5);
JLabel label_6 = new JLabel("9022690165");
label_6.setFont(new Font("Times New Roman", Font.PLAIN, 15));
label_6.setBounds(639, 425, 204, 29);
contentPane.add(label_6);
JLabel label_7 = new JLabel("9579448550");
label_7.setFont(new Font("Times New Roman", Font.PLAIN, 15));
label_7.setBounds(639, 472, 204, 29);
contentPane.add(label_7);
JLabel label_8 = new JLabel("9067009229");
label_8.setFont(new Font("Times New Roman", Font.PLAIN, 15));
label_8.setBounds(639, 518, 204, 29);
contentPane.add(label_8);
Button button = new Button("Back");
button.setFont(new Font("Times New Roman", Font.PLAIN, 15));
button.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
HelpDemo hm=new HelpDemo();
hm.setVisible(true);
hm.setSize(1400, 1200);
dispose();
}
});
button.setBounds(27, 32, 133, 37);
contentPane.add(button);
}
}
class BackgroundPanel extends JPanel {
private static final long serialVersionUID = 1L;
private Image backgroundImage;
public BackgroundPanel(String imagePath) {
try {
backgroundImage = ImageIO.read(new File(imagePath));
} catch (IOException e) {
e.printStackTrace();
}
}
@Override
protected void paintComponent(Graphics g) {
super.paintComponent(g);
g.drawImage(backgroundImage, 0, 0, getWidth(), getHeight(), null);
}
}