-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathButtonsPanel.java
More file actions
50 lines (40 loc) · 1.25 KB
/
ButtonsPanel.java
File metadata and controls
50 lines (40 loc) · 1.25 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
/*Name: Robert Hollinger
* Course: CNT 4714-Spring 2021
* Assignment Title: Project 3 - Two-Tier Client-Server Application Development With MySQL and JDBC
* Date: March 21st, 2021
*/
package sqlClientApp;
import java.awt.Dimension;
import java.awt.FlowLayout;
import javax.swing.JButton;
import javax.swing.JPanel;
import javax.swing.JTextField;
public class ButtonsPanel extends JPanel {
/**
*
*/
private static final long serialVersionUID = -1168176304649182837L;
JButton connect, clearCommand, execute;
JTextField status;
public ButtonsPanel() {
setUpButtonsPanel();
}
private void setUpButtonsPanel() {
//Set up status bar
this.setLayout(new FlowLayout());
this.setMaximumSize(new Dimension(1000, 35));
this.status = new JTextField(20);
this.status.setEditable(false);
this.status.setMaximumSize(new Dimension(800, 20));
this.status.setPreferredSize(new Dimension(800, 20));
//Set up Buttons
this.connect = new JButton("Connect to Database");
this.clearCommand = new JButton("Clear SQL Command");
this.execute = new JButton("Execute SQL Command");
//Add buttons to object
this.add(status);
this.add(connect);
this.add(clearCommand);
this.add(execute);
}
}