Duvida JEditorPane com RTFEditorKit

0 respostas
Scorsatto

Bom dia, tenho um JEditorPane com um RTFEditorKit, quando colo um texto que copiei do word nele, seu alinhamento é perdido, ( Ex: Alinhamento Justificado ), teria como manter o alinhamento dele?

// JPanel panelPrincipal
		this.panelPrincipal = new JPanel();
		this.panelPrincipal.setLayout(null);
		this.panelPrincipal.setBounds(10, 65, 870, 430);
		this.panelPrincipal.setBorder(new TitledBorder(""));
		this.add(this.panelPrincipal);

	  // Create an RTFEditor window
	  this.rtfEditor = new RTFEditorKit();
				
		// JEditorPane editorPanePrincipal
		this.editorPanePrincipal = new JEditorPane();
		this.editorPanePrincipal.setEditorKit(this.rtfEditor);
		
		// JScrollPane scrollPanePrincipal
		this.scrollPanePrincipal = new JScrollPane();
		this.scrollPanePrincipal.setBounds(20, 60, 830, 340);
		this.scrollPanePrincipal.getViewport().add(this.editorPanePrincipal);
		this.panelPrincipal.add(this.scrollPanePrincipal);

Grato.

Criado 23 de novembro de 2010
Respostas 0
Participantes 1