How to use MigLayout? [closed]

2019-01-22 06:37发布

I read some information about Java layout managers and the recommendation was MigLayout. My problem is, that I didn't found any tutorial or easy step-by-step documentation.

So I want to know how this all works, but I don't know how.

Hope, it's not to trivial.

Thanks in advance, guerda

6条回答
forever°为你锁心
2楼-- · 2019-01-22 06:53

Bombe is right... and wrong. I find this whitepaper tends to show off all great features of MiGLayout, entering in nitty gritty details that we would rarely, if ever, use... The paper hesitates between being a tutorial and a reference.

Now, the provided demo applications (at MiG Layout main page and MiG Java Components page) are very well made: you can see the components and how they move/are resized, and you can take a look at the source code used to do this layout, which is a precious source of concrete implementation. Precious because I haven't found many open source projects actually using this layout (perhaps I just wasn't searching properly).

查看更多
爱情/是我丢掉的垃圾
3楼-- · 2019-01-22 07:03

Another help for those coming here now...

I find the Quick Start for MigLayout to be a good place to start, especially when I haven't used it for a while and need to get back up to speed.

查看更多
老娘就宠你
4楼-- · 2019-01-22 07:05

WindowBuilder suports MigLayout, if you want to jump in right away, and look up the docs as needed.

However, the docs and demos from the website are simple enough that it doesn't take much time to read through them.

查看更多
Lonely孤独者°
5楼-- · 2019-01-22 07:09

Maybe its too late. But I found this helpful article on MigLayout: (the original link seems to be offline now, so the only way to access it is archive.org)

The valid link, if the first one's broken, is here.

查看更多
【Aperson】
6楼-- · 2019-01-22 07:14

Any one who came here now can download miglayout-4.0-swt.jar (any version not 4.0 only ) from here

http://www.migcalendar.com/miglayout/versions/4.0/

and see video Tutoial to add them to jar files

http://www.youtube.com/watch?v=XAtKb-KaC7o

查看更多
何必那么认真
7楼-- · 2019-01-22 07:16

The people at MigLayout have setup a great demo that lets you learn how to configure the miglayout through experimentation.

Go to http://www.miglayout.com/ and select Swing Demo. You can then see sample uses of the layout and more importantly, you can right-click on any component (textfield, label, etc.) and change the layout constraints. This is an excellent interactive tool to learn about the layout and how it will work with resizing, etc.

查看更多
登录 后发表回答