Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Over-write the "show()" method of java.awt.Dialog class



Hi all,

I am writing a class which extends the java.awt.Dialog class.
The Dialog class has a "show()" method, which i am trying to over-write.
Now when i try to compile this, it gives me a warning saying it uses a
deprecated method - show().
This is not true. It is the show method of the java.awt.Component class that
is deprecated, but not of java.awt.Dialog. (Although Dialog is a descendent of
Component). Also note that this happens inspite of NOT doing a super.show() in
my class that extends Dialog.

Can someone explain this for me please.

My understanding is as follows -
java.awt.Component - has a deprecated show method.
java.awt.Container extends Component, and does not have a show method. So the
show method of its parent would come into picture which is deprecated. So, Had
I been extending a Container, then this error would have been valid.
java.awt.Dialog extends Container, and DOES have a show method, which is NOT
deprecated. So the show method of its parent (Component) should NOT come into
picture. Isnt that correct?.


Thanks and regards,
--Aliasgar M.--


**********************************************************************
***** IMPORTANT INFORMATION *****
This document should be read only by those persons to whom
it is addressed and its content is not intended for use by
any other persons. If you have received this message in
error, please notify us immediately. Please also destroy and
delete the message from your computer. Any unauthorised form
of reproduction of this message is strictly prohibited.
St.George is not liable for the proper and complete transmission
of the information contained in this communication, nor for any
delay in its receipt.
**********************************************************************
_______________________________________________
java-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/java-dev
Be sure to read the FAQ http://developer.apple.com/java/faq/ before posting
Do not post admin requests to the list. They will be ignored.



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.