• Post Reply Bookmark Topic Watch Topic
  • New Topic

icon in jtextpane  RSS feed

 
sara rod
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!

im creating a JtextPane and I want to add on the left - an icon in a specific line, something like when I am working with eclipse and have a compilation error - on the left of the text - they show an X icon, on the same line where the error is.
how can i do it?
and how can i highlight a text with a color. i put SimpleAttributeSet with background color?

thanks.
 
Stanislav Lapitsky
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The article shows how to add bullets or numberings
http://java-sl.com/bullets_numberings.html

You can do something like this (See bullets).

All you need is to write proper root view.

Regards,
Stas
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!