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

Extra borders created by DefaultListCellRenderer

XMLWordPrintable

    • beta
    • generic
    • generic



      Name: clC74495 Date: 10/13/98


      DefaultListCellRenderer constructor always creates new instances
      of static variable noFocusBorder. Should only create new border
      when null (first time through).

      Change

              noFocusBorder = new EmptyBorder(1, 1, 1, 1);

      to

        if (noFocusBorder == null)
              noFocusBorder = new EmptyBorder(1, 1, 1, 1);

      I supposed using BorderFactory is another alternative to if block,
      as it will cache and return same border.
      (Review ID: 40198)
      ======================================================================

            sswingtrsunw Swingtraq Swingtraq (Inactive)
            clucasius Carlos Lucasius (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: