wood burning stoves*
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 Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Styled text?" Watch "Styled text?" New topic
Author

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
Florian
John Wetherbie
Rancher

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
 
It is sorta covered in the JavaRanch Style Guide.
 
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