suitable LayoutManager for resizable components

前端 未结 4 552
你的背包
你的背包 2021-01-18 07:30

sometime ago I read this article that shows a way to implement mouse resizable components in Swing.

The author uses a null LayoutManager in order to allow absolute c

4条回答
  •  庸人自扰
    2021-01-18 08:09

    The question is somewhat vague, so I might be missing the point completely. I assume that you are looking for a layout that will allow you to use absolute positioning, but will still allow you to resize the component and use all available space.

    If you are handcoding it, I've had success with MIGLayout (http://www.miglayout.com/) and TableLayout (Which is less absolute but very easy to use - http://java.sun.com/products/jfc/tsc/articles/tablelayout/)

    If you are using some Form designer, using GroupLayout might be a good choice, but you do not want to hand-code it. See this question : GroupLayout: Is it worth learning?

提交回复
热议问题