public void actionPerformed(ActionEvent ae) {

        //
        // Process the action command
        //
        // "new" - Create a new transaction
        // "edit" - Edit a transaction
        // "delete" - Delete a transaction
        // "help" - Display help for asset accounts
        //
        try {
            int row, modelRow, option;
            switch (ae.getActionCommand()) {
                case "new":
                    AssetTransactionEditDialog.showDialog(Main.mainWindow, this, null);
                    break;
                    
                case "edit":
                    row = table.getSelectedRow();
                    if (row < 0) {
                        JOptionPane.showMessageDialog(this, "You must select a transaction to edit",
                                                      "Error", JOptionPane.ERROR_MESSAGE);
                    } else {
                        modelRow = table.convertRowIndexToModel(row);
                        AssetTransactionEditDialog.showDialog(Main.mainWindow, this, 
                                                              tableModel.getTransactionAt(modelRow));
                    }
                    break;
                    
                case "delete":
                    row = table.getSelectedRow();
                    if (row < 0) {
                        JOptionPane.showMessageDialog(this, "You must select a transaction to delete",
                                                      "Error", JOptionPane.ERROR_MESSAGE);
                    } else {
                        option = JOptionPane.showConfirmDialog(this,
                                        "Do you want to delete the selected transaction?",
                                        "Confirm Delete", JOptionPane.YES_NO_OPTION);
                        if (option == JOptionPane.YES_OPTION) {
                            modelRow = table.convertRowIndexToModel(row);
                            TransactionRecord transaction = tableModel.getTransactionAt(modelRow);
                            TransactionRecord.transactions.remove(transaction);
                            transaction.clearReferences();
                            tableModel.transactionRemoved(transaction);
                            Main.dataModified = true;
                            row = Math.min(row, table.getRowCount()-1);
                            if (row >= 0)
                                table.setRowSelectionInterval(row, row);
                        }
                    }
                    break;
                    
                case "help":
                    Main.mainWindow.displayHelp(HelpWindow.ASSET_ACCOUNT);
                    break;
            }
        } catch (Exception exc) {
            Main.logException("Exception while processing action event", exc);
        }
    }