my dog learned polymorphism*
The moose likes Swing / AWT / SWT and the fly likes hoe to display text with 'justify' alignment..? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "hoe to display text with Watch "hoe to display text with New topic
Author

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

shahabas shabeer
Ranch Hand

Joined: Feb 23, 2004
Posts: 49
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


The greatest pleasure in life is doing what peoples say you can not do.
Nigel Browne
Ranch Hand

Joined: May 15, 2001
Posts: 673
Read the following tutorial Using HTML in Swing Components
shahabas shabeer
Ranch Hand

Joined: Feb 23, 2004
Posts: 49
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: hoe to display text with 'justify' alignment..?
 
Similar Threads
inputText with vertical alignment with label
problem with header text alignment
Is Java's alignment "Justify" is same as MS Word's alignment "Justify"?
setting text alignment in a TextField
Flipping an image before displaying it