no. i dont want that. i actually am going to draw/paint a symbol to replace the space
im guessing you have to customize the View but if there is a way to set a space character's width without creating a custom View, that is what i am looking for
i copied the source code of DefaultHighlighter and overrode the paintLayeredHighlights() to render the highlights according to when they were added. this way, any new highlight will always be on top of old highlights. lolz. first time i appreciated an IDE's usefulness ha ha!
ok. one more thing, maybe you have an idea. i am doing multiple highlights using different painters (and colors), i want this certain painter object to always be on top and overlap even if there is already a highlight that exists
i was thinking of getting all highlights using jtextpane.getHighlighter().getHighlights() and sort the painter object that needs to be on top all the time to be always on the last of the array. any thoughts?
please type in some text, then highlight it. the background color is black. id like to then change the text color to white for those highlighted areas. but the defaulthighlightpainter does not have any method to do so. any thoughts?
hi. anybody knows which class or which particular method needs to be overridden in order to change the text color of the highlighter in a jtextpane?
im doing this because if the highlighter's background color is black, the text color has to be white. currently it defaults to a gray color.
the HighlightPainter does not have any means to do this, only the color passed as the parameter to the super class will become the background color but if you set a color that is dark, the text foreground color does not change automatically. any thoughts?