Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JScrollPane/height  RSS feed

Sonara Rahul
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Friends,
I ahve a problem in retriving the height of JTextpane for which I ahve set JScrollPane.
From the JScrollPane method I get the height as follows:
JScrollPane jsp=new JScrollpane(JTextPane);
Dimension dim=jsp.getViewport().getViewSize();
int hei=(int)dim.getHeight();

The height I get differs in j2sdk1.4.0_01 & j2sdk1.4.1_02.
The height I get is correct in j2sdk1.4.0_01 but in j2sdk1.4.1_02 it is very greater than j2sdk1.4.0_01 which is ofcourse wrong.
Culd u please help me out in this regard.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!