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

Introduce Window.isOpaque() method

XMLWordPrintable

    • b66
    • generic
    • generic
    • Verified

      Currently, non-opaque windows can be detected with the following check:

          Color bgColor = window.getBackground();
          if (bgColor == null || bgColor().getAlpha() == 255) {
              // opaque
          } else {
              // non-opaque
          }

      Another option is to use AWTUtilities class. However, it resides in com.sun.awt package and is not pretty "official". It would be fine if we can introduce a new method in Window class to handle this task.

            anthony Anthony Petrov (Inactive)
            art Artem Ananiev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: