如何使用Java中的Layoutmanager找到面板?
I have a little problem with my GUI task.
This is the result I should achieve
Can someone please tell me how to change my code, in order to locate my 3 panels correctly?
On the second picture, you can see my JFrame
class.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我会从“ Inside Out” 1 开始,这样做:
I would, starting from the 'inside out'1, do it like this:
仅使用
borderlayout
,这是您的组件结构的外观:borderlayout.center
borderlayout.north
borderlayout.west
和borderlayout.east
borderlayout.center
borderlayout.center
borderlayout.east
borderlayout.north
和borderlayout.south
borderlayout.center
在代码:
Using only
BorderLayout
, this is what your component structure could look like:BorderLayout.CENTER
BorderLayout.NORTH
BorderLayout.WEST
andBorderLayout.EAST
BorderLayout.CENTER
BorderLayout.CENTER
BorderLayout.EAST
BorderLayout.NORTH
andBorderLayout.SOUTH
BorderLayout.CENTER
In code: