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

error in example code for JList in SE v1.3 API documentation

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 1.4.0
    • 1.3.0
    • docs
    • beta
    • generic
    • generic



      Name: yyT116575 Date: 12/07/2000


      java version "1.3.0_01"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0_01)
      Java HotSpot(TM) Client VM (build 1.3.0_01, mixed mode)

      There's a small mistake in the sample code for the JList class in
      Java 2 SDK, SE v1.3 API documentation (
      http://java.sun.com/j2se/1.3/docs/api/javax/swing/JList.html )

      The code to 'display an icon and a string for each object in the list' (class
      myCellRenderer) needs to call setOpaque(true). Otherwise changes to the
      backgroundcolor due to the select state will have no effect. See also bug
      report 4120390
      (Review ID: 113464)
      ======================================================================

            sharonz Sharon Zakhour (Inactive)
            yyoungsunw Yung-ching Young (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: