|
MiGLayout - The Java Layout Manager for Swing & SWT "MiG Layout makes complex layouts easy and normal layouts one-liners."
View this PDF for a Fast Start!
|
|||||||||||||||
| MiGLayout - Easy to use yet very powerful
|
|||||||||||||||
For Java developers writing GUI layouts by hand that wants simplicity, power and automatic per platform fidelity, that are dissatisfied with the current layout managers in Swing and SWT, MiGLayout solves all your layout problems. Unlike JGoodies' FormLayout and Clearthought's TableLayout - MiGLayout solves all your layouts with equal ease in a way that is easy to change and maintain. You will understand how the layout will look like when looking at the code. MiGLayout is the most versatile and flexible Swing and SWT Layout Manager for Java, yet it is very easy to learn and use. It is using String or API type-checked constraints to format the layout. MiGLayout can produce flowing, grid based, absolute (with links), grouped and docking layouts. You will never have to switch to another layout manager ever again! MiGLayout is created to be to manually coded layouts what Matisse/GroupLayout is to IDE supported visual layouts.
|
|||||||||||||||
| Important! MiGLayout in Java 7 and SWT/Eclipse
|
|||||||||||||||
MiGLayout was created to solve the layout issue for Swing. It is future proof since it has support for different units, Hi-DPI layouts and plugability - among other things. Basically it is so extensible that there should be little need for any other layout manager besides Matisse/GroupLayout which is used for visual layout editing. If you want to tell Sun that MiGLayout should be considered for inclusion in JDK 7, so that all developers can benefit from it, you should cast your Vote to Include MiGLayout in Java 7.0. You need to register, but that is free, just like MiGLayout. Note that you have 3 votes at your disposal! SWT/Eclipse Support. MiGLayout is already on the top ten list of feature enhancements for SWT/Eclipse. If you are an SWT/Eclipse user or developer, please go over to the Eclipse Bugzilla site and cast your vote.
|
|||||||||||||||
| Free MiGLayout JavaOne Session Available
|
|||||||||||||||
The Technical Session about MiG Layout at JavaOne 2008 went really well (IMO). The session is now up on Sun's site and it is free! You only need to register on the Sun site, which is free. Here are direct links to the content (the screencast is narrated PDF slides): Screencast, PDF slides.
|
|||||||||||||||
| MiGLayout is Free and Open Source
|
|||||||||||||||
MiGLayout is free to use for commercial and non-commercial projects and the source code is provided. It is licensed under the very free BSD license. We would be glad if you told us about where it is used though and testimonials are especially appreciated. Please spread the word if you like MiGLayout! Likewise we welcome bug reports and feedback at our forums under the MiG Layout section. It will lead to improvements, we promise. As with all MiG Products we have a Zero Bugs Policy!
|
|||||||||||||||
| MiGLayout Downloads
|
|||||||||||||||
New! Downloads Folder (Latest is v3.6 released on 2008-09-04) Change Log Starting from v3.5.5 we have switched to the Maven 2 build and deploy system. Here you can find the Maven Specific Site. Maven users should go there. Quick Start Guide: (PDF) White Paper: (HTML) API JavaDoc: (HTML)
|
|||||||||||||||
| Demo Applications with Source Code for Swing and SWT
|
|||||||||||||||
For the demo applications to work you need to have Java 1.4 or later installed. The Swing version is sand boxed and thus needs no permissions and is therefore completely safe. The SWT version will need full permissions, as all SWT applications do.
|
|||||||||||||||
| Using the MiGLayout Demos for GUI Benchmarking
|
|||||||||||||||
The demo applications can be used for GUI benchmarking. You can for instance measure the difference between SWT and Swing or how the different versions of Java measure up. You can even set another Look&Feel for the Swing version and measure the speed of the widget creation and rendering. To run the demos in benchmarking mode you have to download the .jar(s) from above. Note that you need the .dll to be in the current directory when running the SWT version. It is not needed for the Swing version. Run the .jar with "java -jar swingdemoapp.jar -help" or "java -jar swtdemoapp.jar -help" and the usage and examples are shown. If you want to run the SWT benchmark under Linux or OS X you will need the swtdemoappbase.jar as well as the correct swt.jar and any required native libraries. They are provided on the eclipse site.
|
|||||||||||||||
| Getting Started with MiG Layout
|
|||||||||||||||
It is really simple to get started with MiGLayout. All you need to do is to download the correct .jar from above and add it to you classpath. That's it! You should read the white paper linked above. It contains all you need to know. You might also want to look at the source code for for the demo applications. In the Swing version of the demo application you can right-click any component or container and change the constraints. It is a good way to learn by trial-and-error. Printing the Cheat Sheet is a good idea since it gives you all the keywords in a short and simple list. To give you an idea about how the layout manager works, below is the source code for the Quick Start panel. Note that all gaps (white space) is added automatically. The gaps will be correct for the platform it is run. Even the white space around the components (border) is automatic!
JPanel panel = new JPanel(new MigLayout());
panel.add(firstNameLabel);
panel.add(firstNameTextField);
panel.add(lastNameLabel, "gap unrelated");
panel.add(lastNameTextField, "wrap");
panel.add(addressLabel);
panel.add(addressTextField, "span, grow");
That code produces this panel:
| |||||||||||||||
| Support and Help
|
|||||||||||||||
You can post questions and comments at our forums under the MiG Layout section. You can find more components from MiG InfoCom at the MiG Components and MiG Java Calendar sites.
© 2007 MiG InfoCom AB |