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

Custom AbstractButton implementation still fails with Metal L&F

    XMLWordPrintable

Details

    Description

      Name: krC82822 Date: 06/01/2001


      java version "1.4.0-beta"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta-b65)
      Java HotSpot(TM) Client VM (build 1.4.0-beta-b65, mixed mode)

      Bug number 4290656 describes a bug in
      javax.swing.plaf.metal.MetalBorders
      that was fixed for 1.4b1.

      Unfortunately, at least one nearly-identical
      bug still remains. Here's a comment I wrote
      for bug 4290656:
      >
      > I got hit with a similar bug.
      > Lines 1051 and 1052 of v1.3
      > javax/swing/plaf/metal/MetalIconFactory.java are
      >
      > JRadioButton rb = (JRadioButton)c;
      > ButtonModel model = rb.getModel();
      >
      > but should be
      >
      > JRadioButton rb = (AbstractButton)c;
      > ButtonModel model = rb.getModel();
      >
      > There should be a tool that examines source
      > code for casts that are more restrictive than
      > they have to be. Sun could then run the entire
      > Metal LnF (or even the entire JDK) through it.

      The 1.4b1 line numbers are 1049 and 1050. I don't
      know if that's an actual change from 1.3 or if I
      was slightly off earlier.
      (Review ID: 125551)
      ======================================================================
      ###@###.### 10/6/04 10:10 GMT

      Attachments

        Activity

          People

            kereminsunw Konstantin Eremin (Inactive)
            kryansunw Kevin Ryan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: