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

JEditorPane: The ALT attribute of the IMG tag does not work

XMLWordPrintable

    • beta
    • generic, sparc
    • generic, solaris_2.6

      JEditorPane seems to ignore text specified using the ALT attribute of
      the IMG tag. If the image is not found, the ALT text is not displayed.

      Name: krT82822 Date: 09/15/99


      At <image alt=xxx> , mouse pointer is rolling over the image, the tooltip text should be shown.
      But no tooltip at all.

      import javax.swing.*;
      import java.awt.*;

      class Html03B extends JFrame {
        public static void main(String[] args) {
          Html03B frame = new Html03B( "Html03B" );
          frame.setDefaultCloseOperation(3); // EXIT_ON_CLOSE
          frame.setSize( 340, 540 );
          frame.setVisible( true );
        }
        Html03B( String title ){
          super( title );
          Container pane = getContentPane();
         
          String htmlText1 =
            "<html><body bgcolor=yellow>" +
            "<img src=file:/image/image.jpg alt=ToolTip text>" +

          JLabel htmlComponent = new JLabel( htmlText1 );
          pane.add( htmlComponent, BorderLayout.NORTH );
        }
      }


      ---------------

      9/15/99 eval1127@eng -- may be dupe of 4200439
      (Review ID: 95142)
      ======================================================================

            svioletsunw Scott Violet (Inactive)
            lmhoffma Larry Hoffman (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: