private void buttonEditActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonEditActionPerformed

        String agcoopCompany = "maininterface.ViewCompany";
        String agcoopMember = "maininterface.ViewMember";
        String agcoopSupplier = "maininterface.ViewSupplier";
        String agcoopNonMember = "maininterface.ViewNonMember";
        String agcoopLoan = "maininterface.ViewLoan";
        String agcoopGoods = "maininterface.ViewPurchGoods";
        String agcoopCashloan = "maininterface.ViewCashloan";
        
        
        try{
            if(viewTab.getSelectedComponent().getClass().getName().equals(agcoopCompany))
            {
                vC.editCompany();
            }
        
            else if(viewTab.getSelectedComponent().getClass().getName().equals(agcoopMember))
            {
                vM.editMember();
            }
        
            else if(viewTab.getSelectedComponent().getClass().getName().equals(agcoopSupplier))
            {
                vS.editSupplier();
            }
            else if(viewTab.getSelectedComponent().getClass().getName().equals(agcoopNonMember))
            {
                vNM.editMember();
            }
            else if(viewTab.getSelectedComponent().getClass().getName().equals(agcoopLoan))
            {
                vL.editLoan();
            }
            else if(viewTab.getSelectedComponent().getClass().getName().equals(agcoopGoods))
            {
                vG.editGoods();
            }
            else if(viewTab.getSelectedComponent().getClass().getName().equals(agcoopCashloan))
            {
                vCL.editLoan();
            }
            
            
        }
        catch(Exception e)
        {
            JOptionPane.showMessageDialog(null, "Error: Select row to edit", "Error - Edit information", JOptionPane.ERROR_MESSAGE); 
        }
        // TODO add your handling code here:
    }//GEN-LAST:event_buttonEditActionPerformed