I inherited some code I didn't write that makes a block cursor in a JEditorPane. Instead of a line in front of the next character, it draws a Rectangle around the character. The code actually gets the cursor position and draws a little rectangle itself. But I just discovered that Java has Toolkit.createCustomCursor() and I wondered if that might do some of the work for me. Can anyone tell me if this will work? One of the parameters to createCustomCursor() is an image, so I suspect it would just draw an opaque image over the character. I need a tiny rectangle around the character, and it has to vary in size depending on the font size, and you have to be able to see the underlying character.