posted 21 years ago
Hi Dick, here is the code, use <p> instead.
import javax.swing.JFrame ;
import javax.swing.JButton ;
import java.awt.FlowLayout ;
public class FooFrame extends JFrame
{
private void constructGUI()
{
JButton button = new JButton( "Button" ) ;
button.setToolTipText("<html>This is<p>Tooltip text.</html>");
getContentPane().setLayout( new FlowLayout() ) ;
getContentPane().add( button ) ;
}
public static void main( String[] args )
{
FooFrame f = new FooFrame() ;
f.setSize( 200 , 200 ) ;
f.constructGUI() ;
f.setVisible( true ) ;
}
}