Justificar un texto en un JEditorPane
Hola, tengo un string que es un texto, y me gustaria que apareciera justificado. Para ello le meto las etiquetas de html, y le pongo para que salga justificado y lo que hace es salirme el texto centrado. Esto es lo que hago:
String tags = "<html><head></head><body style="text-align: justify"><font face="Times New Roman" color="black" style="font-size: 14pt"><p> ";
tags += texto;
texto = tags;
texto = texto.replaceAll("n","<br> ");
texto += "</p></font></body></html>";
editorPane = new JEditorPane( "text/html",texto);
Si alguien me podria ayudar...incluso no me importa cambiar el JEditorPane por otro componente de texto. Un saludo y gracias
String tags = "<html><head></head><body style="text-align: justify"><font face="Times New Roman" color="black" style="font-size: 14pt"><p> ";
tags += texto;
texto = tags;
texto = texto.replaceAll("n","<br> ");
texto += "</p></font></body></html>";
editorPane = new JEditorPane( "text/html",texto);
Si alguien me podria ayudar...incluso no me importa cambiar el JEditorPane por otro componente de texto. Un saludo y gracias