You must use html text. For example:
 
import javax.swing.*;
 
public class Multiline extends JFrame
{
  public Multiline()
    {
    JLabel text = new JLabel("<html>Hello<BR>world</html>");
    getContentPane().add(text);
    }
 
  static public void main(String []args)
    {
    Multiline m = new Multiline();
    m.pack();
    m.setVisible(true);
    }
}
Regards.
 
 
-------------------------------------------------------------
                 Jose Luis Rando Calvo
       Area de Investigaci�n y Desarrollo
       Estudio Inform�tica Software S.L.U.
-------------------------------------------------------------
            � � ----====[ Grupo EI ]====---- � �
-------------------------------------------------------------
                  http://www.grupoei.com
               mail: [EMAIL PROTECTED]
                  phone: +34 952 653 516
                  fax:        +34 952 650 460
-------------------------------------------------------------

>>> alex <[EMAIL PROTECTED]> 07/05 7:35  >>>
Is there a way to create a JLabel
with text that breaks across multiple
lines?

Thanks,
-alex

__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/
_______________________________________________
Swing mailing list
[EMAIL PROTECTED]
http://eos.dk/mailman/listinfo/swing

Reply via email to