I am working on a chat application and I want the user to be able to change their font while typing messages.
I tried using the setFont()
method but it changes the font for the entire text within the JTextArea
component and when the text is sent to the display area, another JTextArea component, the font changes do not appear. Instead it displays the text in the font of that set in the display area.
What I want to do is to change the font for either highlighted textarea or for the marker only and when the text is sent to the display area, the font changes should be evident.