Java Reference
In-Depth Information
database table. It also contains a JTextArea , which provides a preview of the generated SQL
command, and an "Insert Data" button.
Listing 6-5: TableEditFrame
package jdbc_bible.part2;
import java.awt.*;
import java.awt.event.*;
import java.util.EventObject;
import java.util.EventListener;
import java.util.Vector;
import javax.swing.*;
import javax.swing.event.*;
import javax.swing.table.*;
/**
* TableEditFrame extends JInternalFrame to create a display which builds
* SQL CREATE statements
* <p/>
* TableBuilder, which extends JTable, is a key component.
*/
class TableEditFrame extends JInternalFrame{
protected JTable table;
protected JTextArea SQLPane = new JTextArea();
protected JButton insertButton = new JButton("Insert Data");
protected DatabaseUtilities dbUtils;
protected String tableName = null;
protected String colNames[] = null;
protected String dataTypes[] = null;
protected String SQLCommand[] = null;
protected String SQLCommandRoot = "";
Search WWH ::




Custom Search