 <p><strong>This answer is based upon what you mentioned in the question when no code snippet was provided and quetion was...</strong></p> <blockquote> <p>I have created a component instance, drawn it onto the screen, and added it to an ArrayList. I'm accessing it by referencing to the drawn one using it's children (getParent() method). However, when I then pass this reference to ArrayLists indexOf(); method, it returns -1. I suppose that means that the component does not exist in the ArrayList. Is this what should happen, or did I probably mess something up in my program? I'm NOT providing you with a SSCCE, I'm not asking you to do any coding, just to tell me if this is normal Java behavior...</p> </blockquote> <p><strong>Here goes the my response</strong></p> <p>The javadoc of <code>indexOf()</code> says... </p> <blockquote> <p>Returns the index of the first occurrence of the specified element in this list, or -1 if this list does not contain the element. More formally, returns the lowest index i such that (o==null ? get(i)==null : o.equals(get(i))), or -1 if there is no such index.</p> </blockquote> <p>As you can see this depends on the <code>equals()</code> implementation for you component. Check your implementation as that holds the key of retrieving the value from list.</p>