aspose file tools*
The moose likes Java in General and the fly likes help in Textarea as i thought Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "help in Textarea as i thought" Watch "help in Textarea as i thought" New topic
Author

help in Textarea as i thought

Maged Roshdy
Greenhorn

Joined: Feb 08, 2003
Posts: 24
hi
i try to change my font,color and size wherever
i want in my textarea .
but i the only methods i found is setForground()
and setFont() that change in the holl textarea.
thanks in advanece
Maged
Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
Then you need to subclass TextArea and build in that functionality.


"JavaRanch, where the deer and the Certified play" - David O'Meara
Ashish Mahajan
Ranch Hand

Joined: Feb 19, 2003
Posts: 77
Hi Maged,
Have u tried using TextPane It's made for that only :-)
As Cindy said u can develop subclass of JTextArea also for the same reason. In my opinion, if the requirement is full fledged Word Processor then use JTextPane or if a simple developer's editor (syntax highlighting etc..) is to be developed then subclass JTextArea's ui BasicTextAreaUI and create ur own custom View which extends PlainView in create(Element) method. Just see the source code of PlainView class, the rest is fairly simple.


The best teams have no specialists, only general contributors with special skills
 
 
subject: help in Textarea as i thought