EditExpenseJFrame.java (AppFxWebService)

package appfxwebserviceclientjaxws;

import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JOptionPane;
import javax.swing.table.DefaultTableModel;
import javax.xml.bind.JAXBException;

public final class EditExpenseJFrame extends javax.swing.JFrame {
    static AppFxWebService _appFxWebService;
    static ClientAppInfoHeader _clientAppInfoHeader;
    static String _eventExpenseId;
    static DefaultTableModel tableModelConstituents = new DefaultTableModel();
    ArrayOfTableEntryListOutputRow typeList;
    
    public void setConstituentsTableModelColumns(){
        //A table on the JFrame shows search results for a constituent search.
        //The table uses tableModelConstituents as a model. This resets the
        //columns and create columns for ID and Name.
        tableModelConstituents.setColumnCount(0);
        tableModelConstituents.addColumn("ID");
        tableModelConstituents.addColumn("Name");
    }

    public static ArrayOfTableEntryListOutputRow loadExpenseTypeCodes()
            throws JAXBException, IOException{
        //retrieveCodeTable retrieves a code table given the the table name.
        //This calls that for EVENTEXPENSETYPECODE and returns the rows in the
        //reply.
        CodeTableEntryGetListReply CodeTableItems =
                retrieveCodeTable("EVENTEXPENSETYPECODE");
        return CodeTableItems.rows;  
    }
    
    public static CodeTableEntryGetListReply retrieveCodeTable 
            (String databaseCodeTableName){
        //Retrieves a code table given the the table name.
        //Request and reply objects for the retrieval.
        CodeTableEntryGetListRequest req = new CodeTableEntryGetListRequest();
        CodeTableEntryGetListReply reply  = new CodeTableEntryGetListReply();        
        
        req.clientAppInfo = _clientAppInfoHeader;
        req.returnListSortMethod = true;
        
        //Review the feature metadata verify if a data form's form fields use 
        //uses any code tables to populate a drop down list box. If so, grab 
        //the database table name for the code table. 
        //Note: This is not the friendly code table name but the database table
        //name.
        req.codeTableName = databaseCodeTableName;
        
        //The API utilizes a Request-Response pattern. The pattern consists of 
        //request-response pairs. An operation is called with the request, such 
        //as codeTableEntryGetList. The request is passed to the operation.
        //A reply is received. Each request and reply type is tailored to the
        //operation. So, the codeTableEntryGetList operation requires a 
        //CodeTableEntryGetListRequest and returns a CodeTableEntryGetListReply.
        //Since we need to retrieve a code table's values we will request the 
        //codeTableEntryGetList operation. Following the Request-Response 
        //pattern, we package up a request (CodeTableEntryGetListRequest),
        //pass the request to the codeTableEntryGetList operation and receive a 
        //response (CodeTableEntryGetListReply).
        reply = 
            _appFxWebService.getAppFxWebServiceSoap12().codeTableEntryGetList(req);

        return reply;
    }
   
    public void getVendors() throws JAXBException, IOException{
        SearchListLoadRequest req = new SearchListLoadRequest();
        req.clientAppInfo = _clientAppInfoHeader;
        
        //You can refer to the feature using the feature's system record id or 
        //name.
        //req.searchListID = "23C5C603-D7D8-4106-AECC-65392B563887";
        req.searchListName = "Constituent Search";
        
        //create a field value set to hold any filters we want to pass in

        //If your searchlist has filters, you may need to provide a value for 
        //one or several of the form fields which serve as the parameters for 
        //the search list
        //Try out the feature's parameters within the application to get a feel 
        //for each of the search list's parameters
        //Tip:  See the <FormMetaData> tag within the SearchListSpec's xml to 
        //view the <FormField> tags that declare the parameters for the search 
        //list.  Or see the Fields tab on the Search List's metadata page.   

        //Each DataFormFieldValue represents a form field. For search lists, 
        //form fields are used as parameters.

        //Create a a list to hold the values, data form item values object to 
        //contain the filter field values list, and a data form item to hold the
        //values object.
        List<DataFormFieldValue> fvList = new ArrayList<DataFormFieldValue> ();
        DataFormItem.Values values = new DataFormItem.Values();
        DataFormItem dfi = new DataFormItem();

        //Add items to the list of data form field values. In this case, two.
        for (int i = 0; i < 2; i++){
            fvList.add(new DataFormFieldValue());
        }
        
        //Set the field values' ID and Value.
        fvList.get(0).setID("FULLNAME");
        fvList.get(0).setValue(jTextFieldVendor.getText());
        values.getFv().add(fvList.get(0));
        
        fvList.get(1).setID("ONLYPRIMARYADDRESS");
        fvList.get(1).setValue(true);
        values.getFv().add(fvList.get(1));
        
        //Set the values object as the value of dfi.values.        
        dfi.setValues(values);
        
        //Set the value for the filter for the request as the dfi object.
        req.setFilter(dfi);
        
        //Invoke the search.
        SearchListLoadReply reply = new SearchListLoadReply();
        reply = _appFxWebService.getAppFxWebServiceSoap12().searchListLoad(req);
        
        //Clear the rows in the search results table on the jFrame and populate
        //the table
        tableModelConstituents.setRowCount(0);
        for (int i = 0; i < 50; i++){
            if (reply.output.rowCount > i) {
                tableModelConstituents.addRow
                        (reply.output.rows.r.get(i).values.v.toArray());
            }
        } 
    }
        
    private void editExpense() throws JAXBException, IOException{       
        DataFormSaveRequest req = new DataFormSaveRequest();
        DataFormSaveReply reply = new DataFormSaveReply();
                
        //A data form may require a context value. Think of a context value as a
        //"parent id". In the example below we are adding an expense for an 
        //event. Therefore, the EventID would be the parent id. Context is 
        //optional for a data form.  A data form may not need a context value. 
        //To determine whether a data form requires a context value, look at for
        //a <Context> XML element within the XML for the data form.
        //Example:
        //<Context ContextRecordType="Event" RecordIDParameter="EVENTID" />
        req.setFormName("Event Expense Edit Form");
        req.setID(_eventExpenseId);
        req.setClientAppInfo(_clientAppInfoHeader);

        //Each DataFormFieldValue represents a form field. For data forms, form 
        //fields are used as to hold end user data entry values. Once the 
        //dataFormSave operation is requested, form field values are passed to 
        //the web server and processed by data form's business logic layer 
        //(sp or clr code). The appropriate form field values can be determined 
        //by looking at the XML <FormField> child elements within the 
        //<FormMetaData> element of the xml within the data form. Be sure you 
        //adhere the Required attributes on the XML <FormField> element of the 
        //XML within the data form. If the Required attribute = true then you 
        //will need to provide a corresponding DataFormFieldValue 
        //in the DataFormFieldValueSet

        //DataFormFieldValue's ID property represents the FieldID attribute 
        //within <FormField> element of the XML within the data form.
        
        //Create a a list to hold the values, data form item values object to 
        //contain the field values list, and a data form item to hold the
        //values object.
        DataFormItem.Values values = new DataFormItem.Values();
        List<DataFormFieldValue> fvList = new ArrayList<DataFormFieldValue> ();
        DataFormItem dfi = new DataFormItem();
        
        //Add items to the list of data form field values. In this case, five.
        for (int i = 0; i < 5; i++){
            fvList.add(new DataFormFieldValue());
        }
        
        fvList.get(0).setID("EVENTEXPENSETYPECODEID");
        fvList.get(0).setValue(jLabelTypeId.getText());
        values.getFv().add(fvList.get(0));
        
        fvList.get(1).setID("VENDORID");
        fvList.get(1).setValue(jLabelVendorId.getText());
        values.getFv().add(fvList.get(1));
                
        fvList.get(2).setID("BUDGETEDAMOUNT");
        fvList.get(2).setValue(jFormattedTextFieldBudgetedAmount.getText());
        values.getFv().add(fvList.get(2));
        
        fvList.get(3).setID("AMOUNTPAID");
        fvList.get(3).setValue(jFormattedTextFieldAmountPaid.getText());
        values.getFv().add(fvList.get(3));
        
        fvList.get(4).setID("COMMENT");
        fvList.get(4).setValue(jTextAreaComment.getText());
        values.getFv().add(fvList.get(4));
        
        //Set the values object as the value of dfi.values.
        dfi.setValues(values);  
        
        //Set the dfi object as the value of the DataFormItem for the request. 
        req.setDataFormItem(dfi);
      
        //Invoke the save.
        reply = _appFxWebService.getAppFxWebServiceSoap12().dataFormSave(req);  
  
        JOptionPane.showMessageDialog(this,reply.toString());
    }

    /** Creates new form AddEditExpenseJFrame */
    public EditExpenseJFrame
            (String exId, String exType, String vendorId, String vendorName,
             String bAmt, String amtPaid, String comment, 
             AppFxWebService appFxWebService,
             ClientAppInfoHeader clientAppInfoHeader)
            throws JAXBException, IOException {
        
        //Since this JFrame is to edit an expense to an event, expense and 
        //service information is received by this form. The add form
        //requires less information since it is adding new information in the 
        //context of a particular event. For the edit, the ID for the expense is
        //already known. So the context is not necessary.
        _appFxWebService = appFxWebService;
        _clientAppInfoHeader = clientAppInfoHeader;
        _eventExpenseId = exId;
        initComponents();
        setConstituentsTableModelColumns();
        
        //Initialize form fields.
        jLabelEventExpenseId.setText(exId);
        
        typeList = loadExpenseTypeCodes();             
        for (int i = 0; i < typeList.r.size(); i++){
            jComboBoxType.addItem(typeList.r.get(i).code);
        }
        jComboBoxType.setSelectedItem(exType);
        jLabelVendorId.setText(vendorId);
        jLabelConstituentVendorId.setText(vendorId);
        jTextFieldVendor.setText(vendorName);
        jFormattedTextFieldBudgetedAmount.setText(bAmt);
        jFormattedTextFieldAmountPaid.setText(amtPaid);
        jTextAreaComment.setText(comment);                
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">                          
    private void initComponents() {

        jLabel1 = new javax.swing.JLabel();
        jFormattedTextFieldBudgetedAmount = new javax.swing.JFormattedTextField();
        jLabel4 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        jLabelConstituentVendorId = new javax.swing.JLabel();
        jLabelEventExpenseId = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        jFormattedTextFieldAmountPaid = new javax.swing.JFormattedTextField();
        jLabel7 = new javax.swing.JLabel();
        jScrollPane1 = new javax.swing.JScrollPane();
        jTextAreaComment = new javax.swing.JTextArea();
        jLabel8 = new javax.swing.JLabel();
        jTextFieldVendor = new javax.swing.JTextField();
        jLabel9 = new javax.swing.JLabel();
        jComboBoxType = new javax.swing.JComboBox();
        jButtonSaveExpense = new javax.swing.JButton();
        jScrollPane2 = new javax.swing.JScrollPane();
        jTableVendorSearch = new javax.swing.JTable();
        jButtonSearch = new javax.swing.JButton();
        jLabel10 = new javax.swing.JLabel();
        jButtonSelect = new javax.swing.JButton();
        jLabelVendorId = new javax.swing.JLabel();
        jLabelTypeId = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setMinimumSize(new java.awt.Dimension(850, 0));

        jLabel1.setText("Budgeted Amount:");

        jFormattedTextFieldBudgetedAmount.setText("jFormattedTextField1");

        jLabel4.setText("Constituent Vendor ID:");

        jLabel5.setText("Event Expense ID:");

        jLabelConstituentVendorId.setText("jLabel6");

        jLabelEventExpenseId.setText("jLabel6");

        jLabel6.setText("Amount Paid:");

        jFormattedTextFieldAmountPaid.setText("jFormattedTextField1");

        jLabel7.setText("Comment:");

        jTextAreaComment.setColumns(20);
        jTextAreaComment.setRows(5);
        jScrollPane1.setViewportView(jTextAreaComment);

        jLabel8.setText("Vendor:");

        jTextFieldVendor.setText("jTextField1");

        jLabel9.setText("Type:");

        jComboBoxType.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jComboBoxTypeActionPerformed(evt);
            }
        });

        jButtonSaveExpense.setText("Save");
        jButtonSaveExpense.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jButtonSaveExpenseMouseClicked(evt);
            }
        });
        jButtonSaveExpense.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonSaveExpenseActionPerformed(evt);
            }
        });

        jTableVendorSearch.setModel(tableModelConstituents);
        jTableVendorSearch.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
        jScrollPane2.setViewportView(jTableVendorSearch);

        jButtonSearch.setText("Search");
        jButtonSearch.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonSearchActionPerformed(evt);
            }
        });

        jLabel10.setText("Vendors");

        jButtonSelect.setText("Select");
        jButtonSelect.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jButtonSelectMouseClicked(evt);
            }
        });
        jButtonSelect.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonSelectActionPerformed(evt);
            }
        });

        jLabelVendorId.setText("jLabel11");

        jLabelTypeId.setText("jLabel11");

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jButtonSaveExpense)
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(layout.createSequentialGroup()
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addComponent(jLabel4)
                                    .addComponent(jLabel5))
                                .addGap(17, 17, 17))
                            .addGroup(layout.createSequentialGroup()
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addComponent(jLabel8)
                                    .addComponent(jLabel9))
                                .addGap(18, 18, 18)))
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jComboBoxType, 0, 188, Short.MAX_VALUE)
                            .addComponent(jLabelEventExpenseId)
                            .addComponent(jLabelConstituentVendorId)
                            .addComponent(jTextFieldVendor, javax.swing.GroupLayout.DEFAULT_SIZE, 188, Short.MAX_VALUE)
                            .addComponent(jLabelVendorId)
                            .addComponent(jLabelTypeId)))
                    .addComponent(jLabel7, javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 316, Short.MAX_VALUE)
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jLabel1)
                            .addComponent(jLabel6))
                        .addGap(18, 18, 18)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addComponent(jFormattedTextFieldBudgetedAmount, javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jFormattedTextFieldAmountPaid, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 183, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButtonSearch, javax.swing.GroupLayout.PREFERRED_SIZE, 81, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(14, 14, 14)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(jLabel10)
                        .addGap(181, 181, 181)
                        .addComponent(jButtonSelect))
                    .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 281, Short.MAX_VALUE))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel4)
                    .addComponent(jLabelConstituentVendorId))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel5)
                    .addComponent(jLabelEventExpenseId))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jComboBoxType, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel9))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabelTypeId)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(4, 4, 4)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(jTextFieldVendor, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jLabel8)
                                .addComponent(jLabel10)
                                .addComponent(jButtonSearch))
                            .addComponent(jButtonSelect))
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createSequentialGroup()
                                .addGap(1, 1, 1)
                                .addComponent(jLabelVendorId)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(layout.createSequentialGroup()
                                        .addGap(35, 35, 35)
                                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                            .addComponent(jFormattedTextFieldAmountPaid, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(jLabel6)))
                                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                        .addComponent(jFormattedTextFieldBudgetedAmount, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addComponent(jLabel1)))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jLabel7)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 144, Short.MAX_VALUE)
                                .addComponent(jButtonSaveExpense))
                            .addGroup(layout.createSequentialGroup()
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 229, javax.swing.GroupLayout.PREFERRED_SIZE))))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                        .addGap(133, 133, 133)
                        .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 128, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(34, 34, 34)))
                .addGap(21, 21, 21))
        );

        pack();
    }// </editor-fold>                        

private void jButtonSaveExpenseActionPerformed(java.awt.event.ActionEvent evt) {                                                   
// TODO add your handling code here:
}                                                  

private void jButtonSaveExpenseMouseClicked(java.awt.event.MouseEvent evt) {                                                
        try {
            //When the user clicks Save, request to save the information from
            //the JFrame.
            editExpense();
        } catch (JAXBException ex) {
            Logger.getLogger(EditExpenseJFrame.class.getName()).log(Level.SEVERE, null, ex);
        } catch (IOException ex) {
            Logger.getLogger(EditExpenseJFrame.class.getName()).log(Level.SEVERE, null, ex);
        }
        //The record is saved. So dispose of the form.
        this.dispose();
}                                               

private void jButtonSearchActionPerformed(java.awt.event.ActionEvent evt) {                                              
        try {
            //When the user clicks Search, request search results based on the
            //information in the the Vendor text field.
                getVendors();
        } catch (JAXBException ex) {
            Logger.getLogger(EditExpenseJFrame.class.getName()).log(Level.SEVERE, null, ex);
        } catch (IOException ex) {
            Logger.getLogger(EditExpenseJFrame.class.getName()).log(Level.SEVERE, null, ex);
        }
}                                             

private void jButtonSelectActionPerformed(java.awt.event.ActionEvent evt) {                                              
// TODO add your handling code here:
}                                             

private void jButtonSelectMouseClicked(java.awt.event.MouseEvent evt) {                                           
    //When the user clicks Select, populate the vendor ID and vendor name fields
    //based on the selected row in the search results table.
    jLabelVendorId.setText(jTableVendorSearch.getValueAt
            (jTableVendorSearch.getSelectedRow(), 0).toString());
    jTextFieldVendor.setText(jTableVendorSearch.getValueAt
            (jTableVendorSearch.getSelectedRow(), 1).toString());
}                                          

private void jComboBoxTypeActionPerformed(java.awt.event.ActionEvent evt) {                                              
    //Set the value of the label for vendor ID based on the selected item in the
    //combo box.
    for (int i = 0; i < typeList.r.size(); i++){
        if (typeList.r.get(i).getCode().equals(jComboBoxType.getSelectedItem().toString())) {
                jLabelTypeId.setText(typeList.r.get(i).id);
        }
    }
    
}                                             

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(EditExpenseJFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(EditExpenseJFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(EditExpenseJFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(EditExpenseJFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {

            @Override
            public void run() {

            }
        });
    }
    // Variables declaration - do not modify                     
    private javax.swing.JButton jButtonSaveExpense;
    private javax.swing.JButton jButtonSearch;
    private javax.swing.JButton jButtonSelect;
    private javax.swing.JComboBox jComboBoxType;
    private javax.swing.JFormattedTextField jFormattedTextFieldAmountPaid;
    private javax.swing.JFormattedTextField jFormattedTextFieldBudgetedAmount;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JLabel jLabelConstituentVendorId;
    private javax.swing.JLabel jLabelEventExpenseId;
    private javax.swing.JLabel jLabelTypeId;
    private javax.swing.JLabel jLabelVendorId;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JTable jTableVendorSearch;
    private javax.swing.JTextArea jTextAreaComment;
    private javax.swing.JTextField jTextFieldVendor;
    // End of variables declaration                   
}