PatchlistModel

Refactored from PerformanceListModel
First the declaration and fields:
private class PatchListModel extends PatchTableModel {
    private final String[] columnNames = {
        "Synth", "Type", "Patch Name", "Field 1", "Field 2", "Comment" };
    private ArrayList list = new ArrayList();
    PatchListModel() {}
    public int getRowCount() {return list.size();}
    public int getColumnCount() {return columnNames.length;}
    public String getColumnName(int col) {return columnNames[col];}
And now the action that returns the fields from the Patch for our LibraryFrame or SceneFrame:

GetValueAt(int row, int col)

public Object getValueAt(int row, int col) {
    IPatch myPatch = (IPatch) list.get(row);
    try {
        switch (col) {
        case SYNTH:
            return myPatch.getDevice().getSynthName();
        case TYPE:
            return myPatch.getType();
        case PATCH_NAME:
            return myPatch.getName();
        case FIELD1:
            return myPatch.getDate();
        case FIELD2:
            return myPatch.getAuthor();
        case COMMENT:
            return myPatch.getComment();
        default:
            ErrorMsg.reportStatus("LibraryFrame.getValueAt: internal error.");
            return null;
        }
    } catch (NullPointerException e) {
        ErrorMsg.reportStatus("LibraryFrame.getValueAt: row=" + row + ", col=" + col + ", Patch=" + myPatch);
        ErrorMsg.reportStatus("row count =" + getRowCount());
        //e.printStackTrace();
        return null;
    }
}
TODO: explain.