Posted By

wnasich on 07/04/11


Tagged

text wrap jlabel


Versions (?)

How To Make JLabel automatically wrap to next line


 / Published in: Java
 

URL: http://www.coderanch.com/t/336273/GUI/java/Make-JLabel-automatically-wrap-next

  1. JLabel myLabel;
  2. String myString =
  3. "<html><p>This is a long paragraph and I want it to break on its own. " +
  4. "This is a long paragraph and I want it to break on its own. " +
  5. "This is a long paragraph and I want it to break on its own. " +
  6. "This is a long paragraph and I want it to break on its own.</p></html>";
  7. myLabel = new JLabel(myString);

Report this snippet  

You need to login to post a comment.