This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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 Murach's Java Servlets and JSP this week in the Servlets 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: 1441
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?
Similar Threads
Need to create the Bold/Italic Font size functionality in the JSP web page
Problem in changing the font
onwrap event
Hyperlinks in text area
Font sizes in a JTextPane