File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

scrollpane problem

 
naved momin
Ranch Hand
Posts: 692
Eclipse IDE Java Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Ranganathan Kaliyur Mannar
Bartender
Posts: 1101
10
Java Netbeans IDE Ubuntu
  • 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
naved momin
Ranch Hand
Posts: 692
Eclipse IDE Java Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic