Justificar Texto

Como faço para justificar um texto no JTextPane ou um outro editor qualquer?

eu uso:

StyledEditorKit.AlignmentAction(“Justificado”, StyleConstants.ALIGN_CENTER))

tm uso o RIGHT e o LEFT mas o StyleConstants.ALIGN_JUSTIFY não funciona.

Alguém sabe pq? e como resolver?

Agradeço,
Fábio

o certo eh ALIGN_JUSTIFIED

tudo bem… eu soh escrevi errado ali. mas o ALIGN_JUSTIFIED n funciona, o texto fica centrazliado ao invés de justificado.

Poderias colar a menor quantidade de código possível?

Dê uma olhada em:

http://java.sun.com/docs/books/tutorial/uiswing/components/editorpane.html