private void processSplits(JDialog parent) {

        //
        // Display the splits dialog
        //
        if (splits == null)
            splits = new ArrayList<TransactionSplit>(5);

        AccountRecord account = null;
        int index = accountField.getSelectedIndex();
        if (index >= 0)
            account = accountModel.getAccountAt(index);

        SplitsDialog.showDialog(parent, splits, account);

        //
        // Update the category/account combo box if necessary
        //
        // The payment and deposit fields are set from the transaction splits
        // and are not editable when there are transaction splits.
        //
        if (splits.size() == 0) {
            splits = null;
            paymentField.setEditable(true);
            depositField.setEditable(true);
            if (showSplits) {
                categoryAccountField.setModel(categoryAccountModel);
                categoryAccountField.setSelectedIndex(0);
                showSplits = false;
            }
        } else {
            paymentField.setEditable(false);
            depositField.setEditable(false);
            double amount = 0.00;

            for (TransactionSplit split : splits)
                amount += split.getAmount();

            if (amount < 0.0) {
                paymentField.setValue(new Double(-amount));
                depositField.setValue(null);
            } else {
                paymentField.setValue(null);
                depositField.setValue(new Double(amount));
            }

            if (!showSplits) {
                categoryAccountField.setModel(splitsModel);
                categoryAccountField.removeAllItems();
                categoryAccountField.addItem("--Split--");
                categoryAccountField.setSelectedIndex(0);
                showSplits = true;
            }
        }
    }