简体   繁体   中英

Fix swing element position relative to parent

I have layered pane in swing application and in that layered pane I am displaying another pane. I have used setBounds method of pane to display pane in right bottom corner of layered pane but when I maximise the application window the pane remain on its specified coordinates which spoils the look of application in maximise mode, I want it to change its location and remain in right bottom corner of layered pane irrespective of main frame size.

So is there a way to get size or coordintes of layerd pane and use that to keep child pane in layered pane's right bottom corner, even if we adjust size of main window child pane should always remain in right bottom corner of layered pane

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM