specifiedAttributes.put(new BasicAttribute("objectClass", objectClass));
specifiedAttributes.put(new BasicAttribute("objectClass",objectClass)); StringBuffer dnBuffer = new StringBuffer(); if (dnMap.size()>0) { for (int i = 0;i<dnMap.size();i++) dnBuffer.append((String)dnMap.get(keyComponents.get(i)) + "_"); dn = dnBuffer.toString(); int l = dn.length(); if (dn.endsWith("_")) dn = dn.substring(0,l-1); dn = dnAttribute + "=" + dn + "," + parent; }  String ownDN = dn; int index =  dn.indexOf(","); if (index>0) ownDN = dn.substring(0,index);
    protected void ok() {        try {            String dn = dnTextField.getText();            String objectClass = (String)objectClassList.getSelectedValue();            Attributes attributes = editor.getData();            Attributes specifiedAttributes = new BasicAttributes();            NamingEnumeration enum = attributes.getAll();	    while (enum.hasMore()) {		Attribute attribute = (Attribute)enum.next();                if (attribute.size() != 0)                    specifiedAttributes.put(attribute);            }            specifiedAttributes.put(new BasicAttribute("objectClass", objectClass));	    getContext().createSubcontext(dn, specifiedAttributes);            editor.setData(emptyAttributes);            objectClassLabel.setVisible(false);            editor.setVisible(false);            okButton.setVisible(false);            cancelButton.setVisible(false);            addButton.setVisible(true);            objectClassList.setVisible(true);                                            }