| Author |
scrollpane problem
|
naved momin
Ranch Hand
Joined: Jul 03, 2011
Posts: 543
|
|
i m making an editor, which has one panel , which inturn has labels which contains the line number and the editor is with frame
the problem is when i reachs end of the line surely editor goes up (similar when you type at the end and scrollpane allows you to view the text at the bottom of your editor)
my problem is line numbers label doesnt go in upward (though it is in scrollpane)
for eg
line number max goes to 35 then the screen finishes after that when i press enter editor scrolls down but this number panel doesnt scrolls down
i guess this will give you a better idea...what is going wrong
|
The Only way to learn is ...........do!
|
 |
Ranganathan Kaliyur Mannar
Ranch Hand
Joined: Oct 16, 2003
Posts: 386
|
|
|
You have set a very small preferred size for the lineNumber panel. Usually, when the size available for the component is larger than the preferred size, the scrollpane doesn't show the scrollbars. So, either change the height of the linenumberpanel or set the preferred size for the scrollpane itself instead of the panel.
|
Ranga.
SCJP 1.4, OCMJEA/SCEA 5.0.
|
 |
naved momin
Ranch Hand
Joined: Jul 03, 2011
Posts: 543
|
|
Ranganathan Kaliyur Mannar wrote:You have set a very small preferred size for the lineNumber panel. Usually, when the size available for the component is larger than the preferred size, the scrollpane doesn't show the scrollbars. So, either change the height of the linenumberpanel or set the preferred size for the scrollpane itself instead of the panel.
resolved
|
 |
 |
|
|
subject: scrollpane problem
|
|
|