標準のJava Swingで3つのコンポーネントを次のように配置する最も簡単な方法は何ですか?
との動的な幅は等しくなるように調整されます。
Component1
Component3
while
Component2
(間にある) は一定の幅を持っていますか?
サイズ変更可能な JPanel (JFrame 内など) があるとします。
小さな幅は次のようになります。
[----------------whole JPanel----------------]
[--Component1--] [Component2] [--Component3--]
大きな幅は次のようになります。
[------------------------whole JPanel------------------------]
[------Component1------] [Component2] [------Component3------]
GroupLayout
注:私はあまりにも長い間「試行錯誤」しました。