954,219 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Fonts

Hi everyone,

I have a text area and a button on a frame and there's some text in the text area. What i need is when the user clicks the button whatever the text selected by the user in the text area and not all the text in the text area is bolded.

I am only using awt components and not any swing components.

Can someone show me or e-mail me a sample program or sample codings or part of the sample program on how this can be done.

My e-mail is [email]freesoft_2000@yahoo.com[/email]

I really hope someone can help me.

Thank you

Yours Sincerely

Richard West

freesoft_2000
Practically a Master Poster
623 posts since Jun 2004
Reputation Points: 25
Solved Threads: 10
 

I think you can use getSelectedText and setSelectedText methods of text area. I dont know about the awt components but I use them in swing.

nanosani
Unauthenticated Liar
Team Colleague
1,830 posts since Jul 2004
Reputation Points: 45
Solved Threads: 56
 

hi everyone,
I checked the JTextArea api and could not find the setSelectedText method that you mentioned. Am i missing something.
Maybe you can tell me where you found this api

Thank you

Your sincerely

Richard West

freesoft_2000
Practically a Master Poster
623 posts since Jun 2004
Reputation Points: 25
Solved Threads: 10
 

Oops !! that method was written by myself when I was making a word pad about two months ago... I searched for it but didnt find it ... I'll post it whenever I find it.

nanosani
Unauthenticated Liar
Team Colleague
1,830 posts since Jul 2004
Reputation Points: 45
Solved Threads: 56
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You