How to determine number of visible lines
From: stevewi (stevewi_at_nortelnetworks.com)
Date: 08/26/04
- Next message: Tim: "Re: best lookandfeel / SWT"
- Previous message: Bernd: "Re: maximize JFrame again and again (OS X)"
- Next in thread: Cid: "Re: How to determine number of visible lines"
- Reply: Cid: "Re: How to determine number of visible lines"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 26 Aug 2004 14:53:53 -0700
How do you find out the number of lines that are visible in
JEditorPane?
I'm displaying nothing but text and using a single font in the
display. I'm using a JScrollPane to handle the scrolling.
I've tried getting the viewport.getVisibleRect() and dividing it by
the font height, but it doesn't match the actual number of lines being
displayed.
Thanks!
- Next message: Tim: "Re: best lookandfeel / SWT"
- Previous message: Bernd: "Re: maximize JFrame again and again (OS X)"
- Next in thread: Cid: "Re: How to determine number of visible lines"
- Reply: Cid: "Re: How to determine number of visible lines"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|