-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSQLConsolePane.java
More file actions
55 lines (40 loc) · 1.33 KB
/
Copy pathSQLConsolePane.java
File metadata and controls
55 lines (40 loc) · 1.33 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
49
50
51
52
53
54
55
import javafx.geometry.Insets;
import javafx.geometry.Pos;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
import javafx.scene.control.ScrollPane;
import javafx.scene.control.TextArea;
import javafx.scene.control.TextField;
import javafx.scene.layout.BorderPane;
import javafx.scene.layout.HBox;
/*Frank Pena
COMP-271-001RL
Class lab 21*/
public class SQLConsolePane extends BorderPane{
protected TextArea textArea = new TextArea();
protected TextField textField = new TextField();
//BUTTONS
Button btFire = new Button("Fire!");
Button btClear = new Button("Clear");
//HBOX
HBox paneForTextField = new HBox(5);
HBox paneForButtons = new HBox(5);
//SCROLL PANE
ScrollPane scrollPane = new ScrollPane(textArea);
public SQLConsolePane() {
drawSQLConsole();
}
private void drawSQLConsole() {
textField.setPrefColumnCount(55);
textArea.setPrefSize(799, 450);
//PLACEMENT
paneForTextField.getChildren().addAll(new Label("SQL Statement: "), textField);
paneForTextField.setPadding(new Insets(40, 10, 10, 10));
paneForButtons.getChildren().addAll(btFire, btClear);
paneForButtons.setAlignment(Pos.CENTER);
paneForButtons.setPadding(new Insets(5, 0, 5, 0));
setTop(paneForButtons);
setCenter(scrollPane);
setBottom(paneForTextField);
}
}