• Post Reply Bookmark Topic Watch Topic
  • New Topic

Scrolling A JLayeredPane  RSS feed

simon keillor
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I'm working on a project that includes dragging objects (labels) around a JLayeredPane. The background of the layered pane can vary, and the size of the layered pane changes to match the size of the background image.

This works well but I want to have the layered pane contained in a scroll pane, so that if the layered pane becomes large then the user can scroll around. I have done this but when the layered pane is resized larger than the scroll pane the scroll bars do not appear.

I use setSize on the layered pane to resize it. Can anyone give me a hint as to why the scroll bars are not appearing?

Any help greatly appreciated.


  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!