This week's book giveaway is in the Testing forum. We're giving away four copies of The Way of the Web Tester: A Beginner's Guide to Automating Tests and have Jonathan Rasmusson on-line! See this thread for details.
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?