-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCustomPanel.java
More file actions
44 lines (28 loc) · 735 Bytes
/
Copy pathCustomPanel.java
File metadata and controls
44 lines (28 loc) · 735 Bytes
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
import javax.swing.*;
import java.awt.*;
import java.io.Serial;
// Ben Smith
// Sep 25, 2024
public class CustomPanel extends JPanel {
@Serial
private static final long serialVersionUID = 1L;
public CustomPanel(String panelName, Dimension d) {
this.setPreferredSize(d);
this.setName(panelName);
}
public CustomPanel(String panelName, Dimension d, BorderLayout bl) {
this.setPreferredSize(d);
this.setName(panelName);
this.setLayout(bl);
}
public void refreshPanel() {
repaint();
revalidate();
}
// public JComponent returnPanel(){
// return panel;
// }
// public void addLabel(JLabel l) {
// panel.add(l);
// }
}