• Post Reply Bookmark Topic Watch Topic
  • New Topic

JEditorPane's text color

 
shansi raj
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Can anyone please tell how to define the JEditorPane's text color?
 
Campbell Ritchie
Marshal
Posts: 52549
119
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try its setForeground method.
 
shansi raj
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I tried that but its not working...
 
Brian Cole
Author
Ranch Hand
Posts: 920
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by shansi raj:
Can anyone please tell how to define the JEditorPane's text color?

I tried [setForeground] but its not working...


What kind of content are you displaying in the JEditorPane? Are
you treating it more or less like a JTextPane, or are you letting
an EditorKit (HTMLEditorKit, RTFEditorKit) do the heavy lifting?

-b
[ August 01, 2008: Message edited by: Brian Cole ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!