It's not a secret anymore!
The moose likes Swing / AWT / SWT and the fly likes Styled text? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Make it so: Java DB Connections & Transactions this week in the JDBC forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Styled text?" Watch "Styled text?" New topic

Styled text?

Meyer Florian
Ranch Hand

Joined: Oct 20, 2003
Posts: 62
Hey there

Does anybody know any solution that allows the user to format the text he enters into a text area (font size, color, type etc.). Important is that the user can use different font styles within the same text area.

SWT or Swing!

Thank you for any comment
John Wetherbie

Joined: Apr 05, 2000
Posts: 1449
Do you want the text to be automatically displayed with the font, color, etc. in the text area or are you talking about providing options to let a person change font, etc. after the text has been typed in? If you want it automatically you may need to create your own listener, document, or document filter. I'd suggest going through the Text Component Features part of the Java Tutorial.

The only reason for time is so that everything doesn't happen all at once.
- Buckaroo Banzai
I agree. Here's the link:
subject: Styled text?
It's not a secret anymore!