-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUI_TableStatus.java
More file actions
executable file
·48 lines (42 loc) · 1.32 KB
/
UI_TableStatus.java
File metadata and controls
executable file
·48 lines (42 loc) · 1.32 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
import java.awt.Color;
import java.awt.Dimension;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.GridLayout;
import java.awt.Insets;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.border.LineBorder;
import javax.swing.border.TitledBorder;
public class UI_TableStatus extends JPanel
{
private JLabel[] label;
private TableStatusControll tsController;
UI_TableStatus()
{
setLayout(new GridLayout(4, 5, 7, 7));
LineBorder pBorder = new LineBorder(Color.BLACK); // 패널 보더
TitledBorder title = new TitledBorder(pBorder, "테이블 현황"); //타이틀 보더
LineBorder lBorder = new LineBorder(Color.BLACK, 2);
title.setTitlePosition(TitledBorder.LEFT);
setBorder(title);
label = new JLabel[20];
for(int i=0; i<20; i++)
{
label[i] = new JLabel();
label[i].setOpaque(true);
label[i].setBackground(Color.white);
label[i].setForeground(Color.black);
label[i].setText(Integer.toString(i+1));
label[i].setHorizontalAlignment(label[i].CENTER);
label[i].setBorder(lBorder);
add(label[i]);
}
System.out.println("UI_TableStatus 패널 생성 완료..");
this.tsController = new TableStatusControll(label);
}
public TableStatusControll getController()
{
return this.tsController;
}
}