• Post Reply Bookmark Topic Watch Topic
  • New Topic

Comparing Attributes  RSS feed

 
Atrus Greyor
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How would I compare attributes from a JTextArea?

For example, if I have a string of words, with each word having a different MutableAttributeSet, how would I compare to see if a particular word matches with a particular MutableAttributeSet?
 
Brian Cole
Author
Ranch Hand
Posts: 936
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Atrus Greyor:
How would I compare attributes from a JTextArea?

For example, if I have a string of words, with each word having a different MutableAttributeSet, how would I compare to see if a particular word matches with a particular MutableAttributeSet?


Which part are you having trouble with, retrieving the attributes from the text component or comparing the attribute sets afterward?

Also, JTextArea doesn't support styled text. Do you mean JTextPane?
[ September 04, 2007: Message edited by: Brian Cole ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!