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

JSlider doesn't show label's animated icon.

XMLWordPrintable

    • b30
    • x86
    • linux
    • Not verified

      Name: gm110360 Date: 02/02/2004


      FULL PRODUCT VERSION :
      java version "1.4.2"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28)
      Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode)

      ADDITIONAL OS VERSION INFORMATION :
      Linux diode 2.4.20-20.9 #1 Mon Aug 18 11:27:43 EDT 2003 i686 athlon i386 GNU/Linux

      A DESCRIPTION OF THE PROBLEM :
      JSlider shows the text but not the icon if the icon is animated.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Run the attached source code.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Animated icon should show.
      ACTUAL -
      Animated icon doesn't show.

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      import javax.swing.*;
      import java.util.*;
      import java.net.*;
      public class SliderAnimation {
        public static void main (final String args[]) throws MalformedURLException {
          final Hashtable labels=new Hashtable();
          final int left=JLabel.LEFT;
          labels.put(new Integer(0),new JLabel("Still",new ImageIcon(new URL("http://www.animationlibrary.com/a-l/images/f0-de.gif")),left));
          labels.put(new Integer(1),new JLabel("Animated",new ImageIcon(new URL("http://www.animationlibrary.com/Animation11/Sports/Track_and_Field/Runner_3.gif")),left));
          final JSlider slide=new JSlider(0,1);
          slide.setLabelTable(labels);
          slide.setPaintLabels(true);
          final JFrame frame=new JFrame();
          frame.getContentPane().add(slide);
          frame.pack();
          frame.show();
        }
      }

      ---------- END SOURCE ----------
      (Incident Review ID: 236533)
      ======================================================================

            rupashka Pavel Porvatov (Inactive)
            gmanwanisunw Girish Manwani (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: