Ver Mensaje Individual
  #2 (permalink)  
Antiguo 23/12/2008, 10:22
sherif
 
Fecha de Ingreso: abril-2006
Ubicación: Burgos
Mensajes: 101
Antigüedad: 18 años, 1 mes
Puntos: 0
Respuesta: modificar texto seleccionado en jeditorpane

Lo he conseguido de otra forma, os lo escribo por si alguno le interesa:

jeditorpane.replaceSelection("<b>" + jeditorpane.getSelectedText() + "</b>");

esto escribiría el tag de texto en negrita. No me hace falta posicionar el cursor por ningún lado.
Un saludo!
__________________
Gigabyte GA-MA78GM-S2H | AMD X2 5400 | 2 x 1 GB DDR2 800 | 7600 Gt 256 Mb | AC97 Audio | Circuit Planet

http://todoaestribor.site88.net