public void renameClass(String oldName){
		for (int i=0;i<components.size();i++){
			if (components.get(i).name.equals(oldName)){
				String newName = 
					JOptionPane.showInputDialog("Enter Class Name:");
				for (DragAndDropClassObject classObject:components){
					for(Link link:classObject.links){
						if (link.classTwoName.equals(oldName)){
							link.classTwoName = newName;
						}
					}
				}
				components.get(i).name = newName;
				diagramPanel.repaint();
				return;
			}
		}
	}