[forwarded from http://bugs.debian.org/392791] Suppose the following program: ----- import javax.swing.*; import java.awt.*; class M extends JFrame{ private JLabel l = new JLabel ("a<br>b"); private JButton b = new JButton ("a<br>b"); M (){ setLayout (new GridLayout (2, 1)); getContentPane().add (l); getContentPane().add (b); setDefaultCloseOperation (EXIT_ON_CLOSE); setSize (200, 200); setVisible (true); } public static void main (String args[]){ new M (); } } --- JLabel honors HTML breakline, while JButton does not. (In fact, what I need is to break lines in JButton's text. And I know there is a workaround by using a JLabel inside the JButton.) gcj-4.2-20060923-1 has the same problem.
There has been a lot of work on HTML for the upcoming 0.93 release of GNU Classpath. Your particular testprogram works now. (In fact, it seems that it doesn't work with Sun's JDK, most likely it doesn't detect your strings as HTML while Classpath does).
I confirm the correct work of our current CVS version. The bug is no longer reproducible.