Java Reference
In-Depth Information
displayTableBuilderFrame();
}else if(menuSelection.equals("Drop Table")){
dropTable();
}else if(menuSelection.equals("Insert")){
displayTableEditFrame();
}else if(menuSelection.equals("ResultSet")){
displayTableQueryFrame();
}else if(menuSelection.equals("Cascade")){// added for Chapter 10
cascade();
}else if(menuSelection.equals("Tile vertically")){
tileVertically();
}else if(menuSelection.equals("Tile horizontally")){
tileHorizontally();
}else if(menuSelection.equals("Database Info")){
displayInfoDialog();
}else if(menuSelection.equals("Exit")){
System.exit(0);
}
}
}
class ExceptionListener implements ActionListener{
public void actionPerformed(ActionEvent event){
String exception = event.getActionCommand();
JOptionPane.showMessageDialog(null, exception,
"SQL Error", JOptionPane.ERROR_MESSAGE);
}
}
class CommandListener implements ActionListener{
public void actionPerformed(ActionEvent event){
String SQLCommand = event.getActionCommand();
executeSQLCommand(SQLCommand);
}
}
public static void main(String args[]){
DBManager dbm = new DBManager();
}
}
The simplest way to illustrate the use of a JDBC application with different databases and different
drivers is to move on to the next topic and to use the new version of the DBManager class as the basis
of the examples.
Search WWH ::




Custom Search