-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGraphicBSTJFrame.java
More file actions
42 lines (39 loc) · 1.2 KB
/
GraphicBSTJFrame.java
File metadata and controls
42 lines (39 loc) · 1.2 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
import java.awt.Color;
import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.*;
public class GraphicBSTJFrame extends JFrame{
public static final int WIDTH = 1600;
public static final int HEIGHT = 1000;
public GraphicBSTJFrame(String framename){
super(framename);
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
this.setSize(WIDTH, HEIGHT);
add(new GraphicBSTJPanel());
setVisible(true);
}
// public void actionPerformed(ActionEvent e) {
// if(e.getSource()==button && textField.getText().equals("")) {
// String temp = textField.getText();
// String[] tempRay = temp.split(" ");
// int tempint;
// if(tempRay.length == 2) {
// try{
// tempint = Integer.parseInt(tempRay[1]);
// if(tempRay[0].equals("add")) {
// tree.add(new BinaryNode(tempint));
// }
// else if(tempRay[0].equals("del")) {
// tree.remove(tempint);
// }
// panel.paintTree(tree);
// }
// catch(Exception error) {
// System.out.println("Not an integer");
// }
// }
// textField.setText("");
// }
// }
}