Swing Overlapping components

后端 未结 3 1632
悲&欢浪女
悲&欢浪女 2021-01-06 14:06

I have two AWT components in a Frame, Panel A and Panel B. I would like panel A to be sized to the height width of the frame (and maintain that size on frame resize), but I

3条回答
  •  借酒劲吻你
    2021-01-06 15:04

    Maybe I'm missing something. If B is fixed size and is at (0,0) and A runs the full width what's the use of having B overlap A? You will never see anything that is placed under B.

    I can't think of any of the default layout managers, but Orielly has this one you can use: relative layout manager (see source code link) with documentation. I haven't used it in a long while, but it should beat managing the layout yourself.

提交回复
热议问题