-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGraphFramePanel_Mother.java
More file actions
52 lines (35 loc) · 989 Bytes
/
GraphFramePanel_Mother.java
File metadata and controls
52 lines (35 loc) · 989 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
45
46
47
48
49
50
51
52
package graphFrame;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.*;
import gray.Global;
public class GraphFramePanel_Mother extends JPanel{
GraphFramePanel_Chart chart;
GraphFramePanel_Search search;
GraphFramePanel_Mother() {
renderpanel();
}
public void renderpanel() {
removeAll();
setLayout(null);
chart = new GraphFramePanel_Chart();
chart.setBounds(0, 0, 800, 500);
search = new GraphFramePanel_Search();
search.setBounds(820, 20, 200, 50);
ActionControl();
add(chart);
add(search);
validate();
repaint();
}
public void ActionControl() {
search.button.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
chart = new GraphFramePanel_Chart();
Global.GraphStart = search.start_date.getText();
Global.GraphEnd = search.end_date.getText();
renderpanel(); //Must render this very panel again.
}
});
}
}