如何在另一个 JPanel 调整大小时调整一个 JPanel 的大小

huangapple 未分类评论48阅读模式
英文:

How to resize a jpanel when another jpanel is resized

问题

它有两个JPanels。第一个有侧边栏,另一个有标题栏。

我希望当隐藏第一个面板时,另一个容器可以被重新调整大小。
例如,如下图所示:

隐藏菜单之前:
如何在另一个 JPanel 调整大小时调整一个 JPanel 的大小

隐藏菜单之后:
如何在另一个 JPanel 调整大小时调整一个 JPanel 的大小

如何实现这个效果呢?

英文:

It has two JPanels. The first has a sidebar and the other has a title bar.

I want When hiding the first one, the other container to be resized.
For example as in the following image :

Before hiding the Menu:
如何在另一个 JPanel 调整大小时调整一个 JPanel 的大小

After hiding the Menu:
如何在另一个 JPanel 调整大小时调整一个 JPanel 的大小

How can this be done?

huangapple
  • 本文由 发表于 2020年5月2日 13:00:25
  • 转载请务必保留本文链接:https://java.coder-hub.com/61554694.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定