-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBookDBGUIFrame.java
More file actions
36 lines (28 loc) · 1.07 KB
/
Copy pathBookDBGUIFrame.java
File metadata and controls
36 lines (28 loc) · 1.07 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
package SQL_Part;
import SQL_Part.DBConnection.ConnectionDB;
import javax.swing.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.util.ArrayList;
public class BookDBGUIFrame extends JFrame implements ActionListener {
static Connection con = null;
String[] labelText = {"ID","Title","Publisher","Year","Price"};
JLabel[] label = new JLabel[labelText.length];
JTextField[] tf = new JTextField[labelText.length];
String[] btnText = {"Previous","Next","Insert","Delete","Reset","Sorting"};
JButton[] btn = new JButton[btnText.length];
String[] dbTableFieldName = {"book_id","title","publisher","year","price"};
PreparedStatement statement;
ResultSet result;
public BookDBGUIFrame() {
// con = ConnectionDB.makeConnection();
ConnectionDB.createTable(con);
ArrayList<String> list = ConnectionDB.getDataFromTable(con);
}
@Override
public void actionPerformed(ActionEvent actionEvent) {
}
}