Alternative solution to null layout manager when absolute positioning is needed

橙三吉。 提交于 2019-12-01 21:39:59

Your best solution would be to implement your own LayoutManager (or extend an existing one, if one is really close to your needs) using the features and controls you are looking for. Your absolute positioning requirements would simply become a method of your layout manager.

For instance, I have, in the past, followed techniques to extend FlowLayout to give it abilities to properly wrap elements when contained in a JScrollPane. Here is an example, although this is not the same one that I used.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!