wood burning stoves 2.0*
The moose likes Swing / AWT / SWT and the fly likes How to change cursor height based on Font size Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "How to change cursor height based on Font size" Watch "How to change cursor height based on Font size" New topic
Author

How to change cursor height based on Font size

Rohit Bhagwat
Ranch Hand

Joined: Dec 19, 2004
Posts: 205
Hello friends, sir, madam

I am using JTextPane and in that textpane I have certain paragraphs. If I select certain words on a line and change the font then the cursor height automatically increases. Now I press the right arrow key to move the cursor towards right. When the cursor is on a font of smaller size then the height of the cursor should also decrease accordingly. But this is not happening. The height of cursor remains the same which it got for the bigger font I had set. So my problem is how to change the height of cursor when it is traversing on text having different font.

Please can anyone help me in this regards

Waiting for your replies.

Thanks and Regards
Rohit.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How to change cursor height based on Font size
 
Similar Threads
JEditorPane weirdo
JTextField in GridLayout format
changing font type and size
displaying scroll messages at the bottom of page
how to change the cursor size for dialog