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

Duplicate code in javax.swing.CellRendererPane.paintComponent

XMLWordPrintable

    • beta
    • generic
    • generic



      Name: krT82822 Date: 01/20/99


      In the method
      public void paintComponent(Graphics g, Component c, Container p, int x, int y, int w, int h, boolean shouldValidate)
      in the class
      javax.swing.CellRendererPane
      the code from line
      145
      to
      147

      is the same as the code from line
      149
      to
      152

      The code
      if ((c instanceof JComponent) && wasDoubleBuffered) {
      ((JComponent)c).setDoubleBuffered(true);
      }
      is the same as
      if (c instanceof JComponent) {
      JComponent jc = (JComponent)c;
      jc.setDoubleBuffered(wasDoubleBuffered);
      }

      I guess someone performed a optimization af the second code
      and forgot to delete it!!
      (Review ID: 52930)
      ======================================================================

            svioletsunw Scott Violet (Inactive)
            kryansunw Kevin Ryan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: