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

JComponent's size, foreground, background and font properties are inaccessible.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.4.0
    • 1.3.0
    • client-libs
    • None
    • beta
    • generic
    • generic

      The getFont, getForeground, getBackground, getMaximumSize,
      getMinimumSize and getPreferredSize methods in JComponent
      have semantics that make it impossible to fully interpret
      the values they return. The problem is that they return
      the apporpiate property value only when it is non-null.

      When the property value is null the methods invoke routines
      to manufacture a suitable default. While these semantics are
      appropriate for general GUI programming, they make it impossible
      for an introspector, as would be used in an IDE, to access the
      true values of these properties.

      Add these:

      JComponent::

              public boolean isMinimumSizeSet()
              public boolean isPreferredSizeSet()
              public boolean isMaximumSizeSet()

      Component::

              public boolean isFontSet()
              public boolean isBackgroundSet()
              public boolean isForegroundSet()
              public boolean isCursorSet()

            pmilnesunw Philip Milne (Inactive)
            pmilnesunw Philip Milne (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: