jtextfield and selection

andrea agostini's icon

Hi.

Do I have a way to query / set the selected text in a jtextfield?

Thank you!
aa

andrea agostini's icon

... I mean, not querying / setting the text itself, but knowing or setting the position of the boundaries of the selection.

Thanks
aa

andrea agostini's icon

... no way? this would be the only missing piece for building a simple syntax-aware text editor... :(

aa

Joshua Kit Clayton's icon

Unfortunately, this is not currently possible.

andrea agostini's icon

oh, that's a shame... thank you anyway!