943,827 Members | Top Members by Rank

Ad:
  • Java Discussion Thread
  • Unsolved
  • Views: 2367
  • Java RSS
Aug 23rd, 2004
0

Fonts

Expand Post »
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 freesoft_2000@yahoo.com

I really hope someone can help me.

Thank you

Yours Sincerely

Richard West
Similar Threads
Reputation Points: 25
Solved Threads: 10
Practically a Master Poster
freesoft_2000 is offline Offline
623 posts
since Jun 2004
Aug 23rd, 2004
0

Re: Fonts

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.
Team Colleague
Reputation Points: 45
Solved Threads: 56
Unauthenticated Liar
nanosani is offline Offline
1,767 posts
since Jul 2004
Sep 16th, 2004
0

Re: Fonts

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
Reputation Points: 25
Solved Threads: 10
Practically a Master Poster
freesoft_2000 is offline Offline
623 posts
since Jun 2004
Sep 16th, 2004
0

Re: Fonts

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.
Team Colleague
Reputation Points: 45
Solved Threads: 56
Unauthenticated Liar
nanosani is offline Offline
1,767 posts
since Jul 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Java Forum Timeline: grades.java -- help!!
Next Thread in Java Forum Timeline: Window class problem(iam a new bee)





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC