yes. Your doubt is correct. The equals(Object obj) of Box is the one which is inherited from Object class. Box class DOES NOT override this method to do something useful comparion. So all that is done by the inherited .equals(Object obj) method is just compare the 2 REFS ARE SAME which is the default implementation from Object class.
On the other hand, the Integer class DOES OVERRIDE this method and compares the content on the Integer objects. So the results are different for the above 2 case mentioned by you.
For your information, the javax.swing package is NOT objectives of SCJP2 Exam. So I am leaving this
thread if any other discussion other than java.swing package follows.
regds
maha anna