0

I know how to se the font of a regular JTextArea, but how would I get an reference to the selected text and only select that?

Here is what I have so far:

setFont(new Font(font, style = Font.BOLD, size));

this works but changes whole area

textArea2.getSelectedText().setFont(new Font("sansserif",Font.BOLD, 12));

this doesn't work, and this is what I need..

How can i do this/

2
Contributors
2
Replies
4
Views
12 Years
Discussion Span
Last Post by shielaborja
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.