简体   繁体   English

固定相对于父级的旋转元素位置

[英]Fix swing element position relative to parent

I have layered pane in swing application and in that layered pane I am displaying another pane. 我在swing应用程序中具有分层窗格,并且在该分层窗格中,我正在显示另一个窗格。 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. 我已经使用窗格的setBounds方法在分层窗格的右下角显示窗格,但是当我最大化应用程序窗口时,该窗格保留在其指定的坐标上,这在最大化模式下破坏了应用程序的外观,我希望它更改其位置并保留不论主框架大小如何,都可以在分层窗格的右下角找到。

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 因此,有一种方法可以获取分层窗格的大小或坐标,并使用它来将子窗格保留在分层窗格的右下角,即使我们调整主窗口的大小,子窗格也应始终保留在分层窗格的右下角

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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