public Customer getCustomer(int id) {
        Customer cust = null;
        Connection con = null;
        Statement stmt = null;
        try {
            DBconnection dbCon = new DBconnection();
            Class.forName(dbCon.getJDBC_DRIVER());

            con = DriverManager.getConnection(dbCon.getDATABASE_URL(),
                    dbCon.getDB_USERNAME(), dbCon.getDB_PASSWORD());
            stmt = con.createStatement();
            ResultSet rs = stmt.executeQuery("Select * From customer Where cst_id=" + id);
            if (rs.next()) {
                cust = new Customer();
                cust.setId(rs.getInt(1));
                cust.setUsername(rs.getString(2));
                cust.setPassword(rs.getString(3));
                cust.setFirstname(rs.getString(4));
                cust.setLastname(rs.getString(5));
                cust.setGender(rs.getInt(6));
                cust.setMaritalstatus(rs.getInt(7));
                cust.setDateofbirth(rs.getDate(8));
                cust.setAddress(rs.getString(9));
                cust.setPhone(rs.getString(10));
                cust.setMobile(rs.getString(11));
                cust.setEmail(rs.getString(12));
                cust.setRemarks(rs.getString(13));
                cust.setIsactive(rs.getBoolean(14));
            }
        } catch (SQLException | ClassNotFoundException ex) {
            System.err.println("Caught Exception: " + ex.getMessage());
        } finally {
            try {
                if (stmt != null) {
                    stmt.close();
                }
                if (con != null) {
                    con.close();
                }
            } catch (SQLException ex) {
                System.err.println("Caught Exception: " + ex.getMessage());
            }
        }
        return cust;
    }