Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个JPanel带有一组图标按钮(一对多)的标题面板()和一个JButton带有符号的按钮()。当我调整面板大小时,无论面板大小如何,我都希望带有符号的按钮始终可见。这意味着如果需要,应该使图标按钮集不可见。
JPanel
JButton
什么是正确的布局?
将按钮放在LINE_END(或更准确地说,对于 RHS,特别是EAST)约束中 a BorderLayout。
LINE_END
EAST
BorderLayout