• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

help in Textarea as i thought

 
Maged Roshdy
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Then you need to subclass TextArea and build in that functionality.
 
Ashish Mahajan
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic