public void deleteComponent(Component com) {
        
        if(com == null) {
            return;
        }
        
        ((ContactItem)com).deleteContactItem();
        Component cm = hd;
        
        while(cm != null) {
            if(cm == com) {
                if(com == hd) {
                    hd = hd.next;
                    if(hd == null) {
                        selected = null;
                        break;
                    }
                    hd.prev = com.prev;
                    break;
                }
                if(cm.prev != null) {
                    cm.prev.next = cm.next;
                }
                if(cm.next != null) {
                    cm.next.prev = cm.prev;
                }
                else {
                    hd.prev = cm.prev;
                }
                break;
            }
            cm = cm.next;
        }
        
        yaxisAssigned = false;
        scrollBarAttached = false;
    }