Java Reference
In-Depth Information
if(rows>=0&&cols>=0){
tableValues += "\n( ";
for(int i=0;i<rows;i++){
String rowData = "";
for(int j=0;j<cols;j++){
String field = (String)table.getValueAt(i,j);
if(field!=null){
if(field.length()==0)break;
if(j==2)rowData+="(";
else if(i>0||j>0)rowData += " ";
rowData += field;
if(j==2)rowData+=")";
}
}
if(rowData.length()==0)break;
tableValues += rowData+",\n";
}
}
if(tableValues.endsWith(",\n")){
int tvLen = tableValues.length()-2;
if(tvLen>0)tableValues = tableValues.substring(0,tvLen);
}
tableValues += " );";
return tableValues;
}
// CommandListener is set by the MVC Controller module as a call back to
// return the SQL command
public void setCommandListener(ActionListener commandListener){
this.commandListener=commandListener;
}
// Listener for the CreateButton
class ButtonListener implements ActionListener{
Search WWH ::




Custom Search