Results 1 to 2 of 2
  1. #1
    elizabeth is offline Member
    Join Date
    Jul 2007
    Posts
    40
    Rep Power
    0

    Default how to set indentation to a text

    I want to display this text in a window:
    Java Code:
    message = "<html><font size = 4></font>Here is the title:</html>\n\n";
    message = message + "<html><font size = 4>
    1 </font>number 1</html>\n";
    message= message + "<html><font color =2D73A4 size = 4>2- </font>number 2</html>\n"  ;
    message = message+  "<html><font color = 12C8E9 size = 4>3- </font>number 3</html>\n"  ;

    and I want number 1,2,3 to have indentation, how can I do that?
    thanks

  2. #2
    tommy is offline Member
    Join Date
    Jul 2007
    Posts
    41
    Rep Power
    0

    Default

    Write a standard HTML document/file. Load it on a JEditorPane.

Similar Threads

  1. Text Animation
    By rossomandop@acm.org in forum AWT / Swing
    Replies: 4
    Last Post: 05-30-2008, 03:34 AM
  2. Using SWT Text
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 01-10-2008, 10:41 AM
  3. String Code Indentation
    By andysh in forum New To Java
    Replies: 1
    Last Post: 12-22-2007, 02:45 AM
  4. map javax.swing.text.Element to javax.swing.text.View
    By elizabeth in forum New To Java
    Replies: 1
    Last Post: 07-30-2007, 07:02 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •