Migrating show/hide code to setVisible

SWinxy swinxythecat at gmail.com
Fri Jul 29 06:25:09 UTC 2022


The show() and hide() methods of java.awt.Component have been deprecated
for a long time now (JDK 1.1, 25 years ago), and a substantial bit of code
is duplicated between them—rather unnecessarily. I think that their code
should be merged into the preferred setVisible(boolean) method. The
deprecated show(), hide(), and show(boolean) would call setVisible(boolean)
with the corresponding value. They won't be deprecated for removal.

>From what I can tell, a migration can be done pretty easily. The headache I
imagine can result is with mixing inheritances/overrides. Thoughts?

-SWinxy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/client-libs-dev/attachments/20220729/9b8b9d32/attachment.htm>


More information about the client-libs-dev mailing list