mark goking

Ranch Hand
+ Follow
since Aug 18, 2009
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by mark goking

also, that should be ListPreference.equals("2")
13 years ago
this is what im following

http://java-sl.com/showpar.html

however, the middle dot is so small. i want to replace it with a bigger symbol
13 years ago
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
13 years ago
hi all, just wondering if it is possible to set a space character's width when painted in a jtextpane?

this is because i want to draw a fat symbol on the space character
13 years ago
@rob: my previous post did say that it is my other alternative. so that is what i did but i used highlights to paint the background
13 years ago
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!
13 years ago
man .. DefaultHighlighter's paintLayeredHighlights() paints highlights in reverse order, that's why the newest highlights do not overlap the old ones.
13 years ago
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?
13 years ago
hi stan, that line needs a highlight object and my highlight object is actually the background color

i need the text color to be white if my highlighter color is dark.
13 years ago
hi camick, that is actually my other alternative. thank you
13 years ago


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?
13 years ago
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?
13 years ago
there is a 3rd party library for inserting data to an excel file, if you want spoonfeeding ;)
13 years ago