-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSeatInformationPanel.java
70 lines (52 loc) · 1.65 KB
/
SeatInformationPanel.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
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
import java.awt.*;
public class SeatInformationPanel extends JPanel
{
public StadiumApp stadiumApp;
JTextField sectionField, rowField, numberField, priceField;
public SeatInformationPanel(String title, StadiumApp _stadiumApp)
{
super();
stadiumApp = _stadiumApp;
setLayout(new GridLayout(4,1));
setBorder(BorderFactory.createTitledBorder("SEAT INFORMATION"));
JLabel sectionLabel = new JLabel("Section: ");
add(sectionLabel);
sectionField = new JTextField();
sectionField.setHorizontalAlignment(JTextField.CENTER);
add(sectionField);
JLabel rowLabel = new JLabel("Row: ");
add(rowLabel);
rowField = new JTextField();
rowField.setHorizontalAlignment(JTextField.CENTER);
add(rowField);
JLabel numberLabel = new JLabel("Number: ");
add(numberLabel);
numberField = new JTextField();
numberField.setHorizontalAlignment(JTextField.CENTER);
add(numberField);
JLabel priceLabel = new JLabel("Price: ");
add(priceLabel);
priceField = new JTextField();
priceField.setHorizontalAlignment(JTextField.CENTER);
add(priceField);
}
public void setSectionField (String _text)
{
sectionField.setText(_text);
}
public void setRowField (String _text)
{
rowField.setText(_text);
}
public void setNumberField (String _text)
{
numberField.setText(_text);
}
public void setPriceField (String _text)
{
priceField.setText(_text);
}
}