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

JToolTip HTML support does not yet work at Swing1.1.1beta2

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 1.1.7
    • client-libs



      Name: vi73552 Date: 04/08/99


      Swing1.1.1beta2 's CHANGES.txt says :
      many components can now contain HTML text.
      These components include instances of JButton and JLabel
      (whose HTML support was added in Swing 1.1.1 Beta 1),
       JMenuItem, JMenu, JCheckBoxMenuItem,
      JRadioButtonMenuItem, JTabbedPane, and JToolTip

        But JToolTip HTML support does not yet work at Swing1.1.1beta2

      //-----------------------------------------------------
      mport javax.swing.*;
      import java.awt.*;

      class HtmlToolTipTest extends JFrame {
        public static void main(String[] args) {
          HtmlToolTipTest w = new HtmlToolTipTest( "HtmlToolTipTest" );
          w.setSize( 200, 300 );
          w.setVisible( true );
        }
        HtmlToolTipTest( String title ){
          super( title );
          Container pane = getContentPane();
          pane.setLayout( new BoxLayout( pane, BoxLayout.Y_AXIS ) );
          
          String htmlText1 =
      "<html>A JButton with <i>various <font color=blue>text styles" +
      "<br>And a new line!</font></i>" +
              "<br><font color=red>red text</font>";
          JButton button1 = new JButton( htmlText1 );
          button1.setToolTipText( htmlText1 );
          pane.add( button1, BorderLayout.NORTH );
        }
      }
      (Review ID: 56711)
      ======================================================================

            tprinzing Tim Prinzing (Inactive)
            vasya Vassili Igouchkine (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: