Win a copy of Bad Programming Practices 101 (e-book) this week in the Beginning Java forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

displaying words in different fonts or colors in a textarea  RSS feed

 
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how can i display text in a Textarea in different colors or fonts?
how can i set the cursor postion in Textarea?
 
Ranch Hand
Posts: 407
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use html and the Swing/Java Html based components (google) ...
 
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
> how can i display text in a Textarea in different colors or fonts?

use a JTextPane


> how can i set the cursor postion in Textarea?

setCaretPosition()
 
Hey cool! They got a blimp! But I have a tiny ad:
Why should you try IntelliJ IDEA ?
https://coderanch.com/wiki/696337/IntelliJ-IDEA
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!