File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 Soft Skills this week in the Jobs Discussion 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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to change cursor height based on Font size