Java Reference
In-Depth Information
reportException(e.getMessage());
}
}
public void setExceptionListener(ActionListener exceptionListener){
this.exceptionListener=exceptionListener;
}
private void reportException(String exception){
if(exceptionListener!=null){
ActionEvent evt = new ActionEvent(this,0,exception);
exceptionListener.actionPerformed(evt);
}else{
System.err.println(exception);
}
}
}
Summary
Having read this chapter, you should have a good understanding of the following topics:
How a relational database stores data in the rows and columns that make up tables
Records and fields are and how they relate to rows and columns
Integrity constraints
Creating a table with
SQL CREATE
Removing a table with
SQL DROP
Modifying a table with
SQL ALTER
Using JDBC and Swing to create a Table Builder
In
Chapter 6
,
we discuss the
SQL INSERT
command and use it to populate our Name and Address
Table with data.