Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-5047523

java.awt.Window/Dialog.setVisible() semantics lost

XMLWordPrintable

    • b43
    • generic
    • generic
    • Verified

      Background: In java.awt.Window and java.awt.Dialog, the Component.show() method is overridden to provide some additional behaviors as documented in the JDK 1.4.2 spec (such as bringing the window to the front). Also, Window/Dialog.setVisible() inherit from Component.setVisible(), which delegates to Component.show() for its implementation.

      There are two problems:

      1) In JDK 1.5, Window/Dialog.show() have been marked as deprecated (good - see bug 4689044) and the specifications of these methods have been removed (bad). That means that there is no longer any specification of the additional semantics required of the show() and setVisible() methods on Window and Dialog.

      2) In JDK 1.1 - JDK 1.4, the specifications for Window/Dialog.show() documented the additional behaviors provided by these methods, but the specification for Window/Dialog.setVisible() did not -- this method was simply inherited from Component.setVisible(). This has led at least one customer to conclude that show() and setVisible() on these classes have different semantics, when actually they are identical.

      See suggested fix.

      ###@###.### 2004-05-14

            dav Andrei Dmitriev (Inactive)
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: