Subversion Repository Public Repository

FingerPrint_5.2

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
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
package test;

import java.awt.BorderLayout;
import java.awt.FlowLayout;
import java.util.Vector;

import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JLabel;
import java.awt.Color;
import java.awt.Font;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;

public class ModalVisitorInfo extends JDialog {
	private final JPanel contentPanel = new JPanel();
	JLabel lblVisitorid		= null;
	JLabel lblVisitor_type		= null;
	JLabel lblStudent_id		= null;
	JLabel lblStudent_name		= null;
	JLabel lblVisitor_fname	= null;
	JLabel lblVisitor_lname	= null;
	JLabel lblVisitor_dob		= null;
	JLabel lblVisitor_address	= null;
	JLabel lblVisitor_mobile	= null;
	JLabel lblVisitor_email	= null;
	
	Vector value;
	
	public static void main(String[] args) {
		try {
			ModalVisitorInfo dialog = new ModalVisitorInfo();
			dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
			dialog.setVisible(true);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
	
	public void initComponent(){
		setBounds(100, 100, 450, 328);
		getContentPane().setLayout(new BorderLayout());
		contentPanel.setBackground(Color.WHITE);
		contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
		getContentPane().add(contentPanel, BorderLayout.CENTER);
		contentPanel.setLayout(null);
		
		lblVisitorid = new JLabel("1");
		lblVisitorid.setFont(new Font("Tahoma", Font.PLAIN, 14));
		lblVisitorid.setBounds(128, 11, 296, 14);
		contentPanel.add(lblVisitorid);
		
		lblVisitor_type = new JLabel("2");
		lblVisitor_type.setFont(new Font("Tahoma", Font.PLAIN, 14));
		lblVisitor_type.setBounds(128, 32, 296, 14);
		contentPanel.add(lblVisitor_type);
		
		lblStudent_id = new JLabel("3");
		lblStudent_id.setFont(new Font("Tahoma", Font.PLAIN, 14));
		lblStudent_id.setBounds(128, 57, 296, 14);
		contentPanel.add(lblStudent_id);
		
		lblStudent_name = new JLabel("4");
		lblStudent_name.setFont(new Font("Tahoma", Font.PLAIN, 14));
		lblStudent_name.setBounds(128, 82, 296, 14);
		contentPanel.add(lblStudent_name);
		
		lblVisitor_fname = new JLabel("5");
		lblVisitor_fname.setFont(new Font("Tahoma", Font.PLAIN, 14));
		lblVisitor_fname.setBounds(128, 107, 296, 14);
		contentPanel.add(lblVisitor_fname);
		
		lblVisitor_lname = new JLabel("6");
		lblVisitor_lname.setFont(new Font("Tahoma", Font.PLAIN, 14));
		lblVisitor_lname.setBounds(128, 132, 296, 14);
		contentPanel.add(lblVisitor_lname);
		
		lblVisitor_dob = new JLabel("7");
		lblVisitor_dob.setFont(new Font("Tahoma", Font.PLAIN, 14));
		lblVisitor_dob.setBounds(128, 157, 296, 14);
		contentPanel.add(lblVisitor_dob);
		
		lblVisitor_address = new JLabel("8");
		lblVisitor_address.setFont(new Font("Tahoma", Font.PLAIN, 14));
		lblVisitor_address.setBounds(128, 182, 296, 14);
		contentPanel.add(lblVisitor_address);
		
		lblVisitor_mobile = new JLabel("9");
		lblVisitor_mobile.setFont(new Font("Tahoma", Font.PLAIN, 14));
		lblVisitor_mobile.setBounds(128, 207, 296, 14);
		contentPanel.add(lblVisitor_mobile);
		
		lblVisitor_email = new JLabel("10");
		lblVisitor_email.setFont(new Font("Tahoma", Font.PLAIN, 14));
		lblVisitor_email.setBounds(128, 232, 296, 14);
		contentPanel.add(lblVisitor_email);
		{
			JLabel lblNewLabel = new JLabel("Visitor Id");
			lblNewLabel.setFont(new Font("Tahoma", Font.BOLD, 13));
			lblNewLabel.setBounds(10, 11, 114, 14);
			contentPanel.add(lblNewLabel);
		}
		{
			JLabel lblVisitorType = new JLabel("Visitor Type");
			lblVisitorType.setFont(new Font("Tahoma", Font.BOLD, 13));
			lblVisitorType.setBounds(10, 32, 114, 14);
			contentPanel.add(lblVisitorType);
		}
		{
			JLabel lblStudentName = new JLabel("Student Name");
			lblStudentName.setFont(new Font("Tahoma", Font.BOLD, 13));
			lblStudentName.setBounds(10, 82, 114, 14);
			contentPanel.add(lblStudentName);
		}
		{
			JLabel lblStudentId = new JLabel("Student Id");
			lblStudentId.setFont(new Font("Tahoma", Font.BOLD, 13));
			lblStudentId.setBounds(10, 57, 114, 14);
			contentPanel.add(lblStudentId);
		}
		{
			JLabel lblVisitoraddress = new JLabel("Visitor_Address");
			lblVisitoraddress.setFont(new Font("Tahoma", Font.BOLD, 13));
			lblVisitoraddress.setBounds(10, 182, 114, 14);
			contentPanel.add(lblVisitoraddress);
		}
		{
			JLabel lblVisitorDob = new JLabel("Visitor Dob");
			lblVisitorDob.setFont(new Font("Tahoma", Font.BOLD, 13));
			lblVisitorDob.setBounds(10, 157, 114, 14);
			contentPanel.add(lblVisitorDob);
		}
		{
			JLabel lblVisitorLname = new JLabel("Visitor Lname");
			lblVisitorLname.setFont(new Font("Tahoma", Font.BOLD, 13));
			lblVisitorLname.setBounds(10, 132, 114, 14);
			contentPanel.add(lblVisitorLname);
		}
		{
			JLabel lblVisitorFname = new JLabel("Visitor Fname");
			lblVisitorFname.setFont(new Font("Tahoma", Font.BOLD, 13));
			lblVisitorFname.setBounds(10, 107, 114, 14);
			contentPanel.add(lblVisitorFname);
		}
		{
			JLabel lblVisitorEmail = new JLabel("Visitor Email");
			lblVisitorEmail.setFont(new Font("Tahoma", Font.BOLD, 13));
			lblVisitorEmail.setBounds(10, 232, 114, 14);
			contentPanel.add(lblVisitorEmail);
		}
		{
			JLabel lblVisitorMobile = new JLabel("Visitor Mobile");
			lblVisitorMobile.setFont(new Font("Tahoma", Font.BOLD, 13));
			lblVisitorMobile.setBounds(10, 207, 114, 14);
			contentPanel.add(lblVisitorMobile);
		}
		{
			JPanel buttonPane = new JPanel();
			buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT));
			getContentPane().add(buttonPane, BorderLayout.SOUTH);
			{
				JButton okButton = new JButton("OK");
				okButton.addActionListener(new ActionListener() {
					public void actionPerformed(ActionEvent e) {
						dispose();
					}
				});
				okButton.setActionCommand("OK");
				buttonPane.add(okButton);
				getRootPane().setDefaultButton(okButton);
			}
		}
	}

	public ModalVisitorInfo() {
		setTitle("Visitor Info");
		initComponent();
	}
	
	public ModalVisitorInfo(Vector value){
		initComponent();
		//System.out.println("@@@2 get value: "+value);
		String visitorid		= (value.elementAt(0) ==null)?"":value.elementAt(0) .toString();
		String visitor_type		= (value.elementAt(1) ==null)?"":value.elementAt(1) .toString();
		String student_id		= (value.elementAt(2) ==null)?"":value.elementAt(2) .toString();
		String student_name		= (value.elementAt(3) ==null)?"":value.elementAt(3) .toString();
		String visitor_fname	= (value.elementAt(4) ==null)?"":value.elementAt(4) .toString();
		String visitor_lname	= (value.elementAt(5) ==null)?"":value.elementAt(5) .toString();
		String visitor_dob		= (value.elementAt(6) ==null)?"":value.elementAt(6) .toString();
		String visitor_address	= (value.elementAt(7) ==null)?"":value.elementAt(7) .toString();
		String visitor_mobile	= (value.elementAt(8) ==null)?"":value.elementAt(8) .toString();
		String visitor_email	= (value.elementAt(9) ==null)?"":value.elementAt(9) .toString();
		
		lblVisitorid.setText(visitorid);
		lblVisitor_type.setText(visitor_type);
		lblStudent_id.setText(student_id);
		lblStudent_name.setText(student_name);
		lblVisitor_fname.setText(visitor_fname);
		lblVisitor_lname.setText(visitor_lname);
		lblVisitor_dob.setText(visitor_dob);
		lblVisitor_address.setText(visitor_address);
		lblVisitor_mobile.setText(visitor_mobile);
		lblVisitor_email.setText(visitor_email);
	}
}

Commits for FingerPrint_5.2/src/test/ModalVisitorInfo.java

Diff revisions: vs.
Revision Author Commited Message
1 lingaraj picture lingaraj Sat 24 Nov, 2018 09:32:39 +0000