Hello good day. I am trying to figure out if it is at all possible for me to do but

I want to access the area that is outside the JScrollPane's view when my JFrame is resized.

Let me explain; I have a LayeredPanewith two layers within a JscrollPane. The Second layer's visible content is off to one side so that it looks like a dock. When I click it, it slides left, on to the screen and vice versa when clicked again. This works well as long the window is maximized. However once the JFrame resizes (shrinks), this second layer seems to be anchored to the right side of the JFrame, so that whenever the JFrame resizes (enlarged but not maximized) it seems to be floating in the middle of the screen.

I'd love to have it always be rooted at the position it is when the JFrame is maximized. If my question is clear, is there a way to do this?

3 Years
Discussion Span
Last Post by CoilFyzx

I thought of positioning it at it's position even when it is not visible in the scroll pane view. But I'm not sure how to do that....haven't found anything in the API yet.

  • just guessing ---> not possible to suggest something fomr this desription

  • use JWindow (undecorated modal JDialog if is neccessary to protect users input or focus) instead of endless funny story about dock(ing) something somewhere

  • examples about focus recycle for JWindow/JDialog is in all good JCalendars (suggest to see JCalendar by @Kai Todter)

Edited by mKorbel

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.