This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes TextPane Problem.... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "TextPane Problem...." Watch "TextPane Problem...." New topic

TextPane Problem....

Steven Hsu

Joined: Sep 05, 2002
Posts: 2
How do I set the styles( color, fonts ) of char in selection?
I use setFont() ,but it works on the entire not the selection.
thanks for your help...
Zhao Fu Qiang

Joined: May 29, 2002
Posts: 10
Pls look package javax.swing.text

Extreme Component, Inc.
Nathan Pruett

Joined: Oct 18, 2000
Posts: 4121

"zfq" -

Welcome to the JavaRanch! Please adjust your displayed name to meet the
JavaRanch Naming Policy.
You can change it here.

And here's a link to Sun's Text tutorial...

Thanks! and welcome to the JavaRanch!
[ September 09, 2002: Message edited by: Nathan Pruett ]

Write once, run anywhere, because there's nowhere to hide! - /. A.C.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: TextPane Problem....
It's not a secret anymore!