File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Swing / AWT / SWT and the fly likes Partial selection of Text in textArea Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Partial selection of Text in textArea" Watch "Partial selection of Text in textArea" New topic

Partial selection of Text in textArea

samander samander

Joined: Dec 08, 2004
Posts: 1
i am making chat application and i have one TextAtea than i want to change style,color,fontsize of selected text.
but my chat application change whole text properties i want only for selected text plz give some formate or code for that.

Ransika deSilva
Ranch Hand

Joined: Feb 18, 2003
Posts: 524
I had the same requirement and once again helped me, so let me pass the knowledge which I have to you. This link will help.Java Almanac What you have to do is that to put this coding which is given in this page and call that method with different parameters when you want to change the font type, size, color etc.
Hope I gave the solution for your problem.

SCJP 1.4, SCMAD 1.0<br />SCWCD, SCBCD (in progress)
Jessica Sant

Joined: Oct 17, 2001
Posts: 4313

I'm moving this to the Swing/AWT forum where TextArea stuff is discussed pretty often.

Please post your replies there, thanks!
I agree. Here's the link:
subject: Partial selection of Text in textArea
It's not a secret anymore!