-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
1.1.7
-
generic
-
generic
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)
======================================================================
- duplicates
-
JDK-4209277 ParagraphView doesn't consider forced breaks when computing preferred size
-
- Resolved
-