• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

hoe to display text with 'justify' alignment..?

 
shahabas shabeer
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi friends,
I want to display some text with 'justify' alignment (the alignment obtained using align='justify' in html ). Can anybody tell me how can I do this and the component that I should use..?. If possible, please provide code samples.

Thanks
Shahabas E Shabeer
 
Nigel Browne
Ranch Hand
Posts: 703
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Read the following tutorial Using HTML in Swing Components
 
shahabas shabeer
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your reply..
I am sorry, my question was not clear.
Actually I want to display a BLOCK of text (say a paragraph) with 'justify' alignment. I tried HTML formatting. But unfortunately it is not working. When used with JLabel,JTextPane and JEditorPane, the result of align='center' and align='justify' are the same.
I want the paragraph to be displayed with equal margins on both the left
and right side of page.Is this possible.?

Thanks
Shahabas E Shabeer
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic