When it's a class that you're extending, it's ideally better to avoid overriding a deprecated method, as in a future release when/if that is removed, and you need to upgrade to the newer version of the library, you will have to rework with the removed method which was deprecated.
If in your instance this is the JFrame class that you're extending, and you intend to override the show()
method, you can instead override the setVisible(boolean b)
method (doc) which is the replacement for the show()
method as mentioned in the javadoc.
Also, it is not advisable to override a base class method and entirely change its function, as
- You cannot use the method for it's original use-case
- The method's intent becomes misleading and makes no sense to override the method, when you can actually create a new method which clearly indicates its function