-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTProfile.java
More file actions
124 lines (120 loc) · 3.29 KB
/
Copy pathTProfile.java
File metadata and controls
124 lines (120 loc) · 3.29 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
import javax.swing.*;
import javax.swing.ImageIcon;
import javax.swing.JFrame;
import java.awt.event.*;
import java.awt.Color;
import java.awt.Font;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import java.awt.event.WindowListener;
import java.awt.event.WindowEvent;
import java.sql.*;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
public class TProfile extends JFrame
{
JPanel p1,p2;
JLabel l1,l2,l3,l4,l5,l6,l7,l8,l9,l10,l11,l12,l13,l14,l15,l16,l17,l18;
Connection con;
TProfile()
{
MyConnection my = new MyConnection();
con = my.Connect();
p1 = new JPanel();
p1.setLayout(null);
p1.setBounds(0,0,700,50);
p1.setBackground(new Color(96, 130, 182));
p2 = new JPanel();
p2.setLayout(null);
p2.setBounds(0,50,700,650);
p2.setBackground(new Color(255,255,255));
l1 = new JLabel("Trainer ID:");
l1.setFont(new Font("arial", Font.BOLD,14));
l1.setBounds(30,55,80,25);
l2 = new JLabel();
l2.setFont(new Font("arial", Font.BOLD,14));
l2.setBounds(120,55,100,25);
l3 = new JLabel("Name:");
l3.setFont(new Font("arial", Font.BOLD,14));
l3.setBounds(30,95,80,25);
l4 = new JLabel();
l4.setFont(new Font("arial", Font.BOLD,14));
l4.setBounds(120,95,100,25);
l5 = new JLabel("Phone No:");
l5.setFont(new Font("arial", Font.BOLD,14));
l5.setBounds(30,135,80,25);
l6 = new JLabel();
l6.setFont(new Font("arial", Font.BOLD,14));
l6.setBounds(120,135,100,25);
l7 = new JLabel("Email ID:");
l7.setFont(new Font("arial", Font.BOLD,14));
l7.setBounds(30,175,80,25);
l8 = new JLabel();
l8.setFont(new Font("arial", Font.BOLD,14));
l8.setBounds(120,175,100,25);
l9 = new JLabel("Address:");
l9.setFont(new Font("arial", Font.BOLD,14));
l9.setBounds(30,215,80,25);
l10 = new JLabel();
l10.setFont(new Font("arial", Font.BOLD,14));
l10.setBounds(120,215,200,25);
l11 = new JLabel("Type:");
l11.setFont(new Font("arial", Font.BOLD,14));
l11.setBounds(30,255,80,25);
l12 = new JLabel();
l12.setFont(new Font("arial", Font.BOLD,14));
l12.setBounds(120,255,100,25);
l13 = new JLabel("Height:");
l13.setFont(new Font("arial", Font.BOLD,14));
l13.setBounds(30,295,80,25);
l14 = new JLabel();
l14.setFont(new Font("arial", Font.BOLD,14));
l14.setBounds(120,295,100,25);
l15 = new JLabel("Weight:");
l15.setFont(new Font("arial", Font.BOLD,14));
l15.setBounds(30,335,80,25);
l16 = new JLabel();
l16.setFont(new Font("arial", Font.BOLD,14));
l16.setBounds(120,335,80,25);
l17 = new JLabel("Image:");
l17.setFont(new Font("arial", Font.BOLD,14));
l17.setBounds(30,375,80,25);
l18 = new JLabel();
l18.setBounds(120,375,146,121);
add(p1);
add(p2);
p2.add(l1);
p2.add(l2);
p2.add(l3);
p2.add(l4);
p2.add(l5);
p2.add(l6);
p2.add(l7);
p2.add(l8);
p2.add(l9);
p2.add(l10);
p2.add(l11);
p2.add(l12);
p2.add(l13);
p2.add(l14);
p2.add(l15);
p2.add(l16);
p2.add(l17);
p2.add(l18);
setSize(700,700);
setLayout(null);
setLocationRelativeTo(null);
addWindowListener(new WindowAdapter()
{
public void windowClosing(WindowEvent w)
{
dispose();
}
});
}
public static void main(String[] args)
{
new TProfile();
}
}