Normally, GUIDE can do this without any problems. For example, using a MigCalander directly from a Jar file is possible. But it's a bit more tricky with MacWidgets.
I'm a big fan of Ken's work on MacWidgets. But aside from creating a beautiful Mac experience in Swing, he also decided to take on Swing's component pattern. Normally in Swing, when you want to create a custom component, you extend from JComponent and override some methods to customize the behaviour. GUIDE seamless handles these types of extensions.
MacWidgets takes a different approach. For example, SourceList doesn't extend anything. It isn't even a real component; rather, it contains a component. I think what the author was trying to achieve was to expose only the API that was relevant to source lists.
Unfortunately, this pattern is so unusual in Swing that it's difficult for GUIDE to support it like most components. There are two ways you can use MacWidgets in GUIDE, but I'm going to focus on the best way. Normally (the way I use GUIDE), I create components from the palette and, if I need to, I can inject references to them in my controller via setter methods. But in this case, we do it the other way around. Our controller will create the MacWidget and expose the component through a getter.
For example:
import com.explodingpixels.macwidgets.SourceList;
import com.explodingpixels.macwidgets.SourceListCategory;
import com.explodingpixels.macwidgets.SourceListItem;
import javax.swing.*;
public class Controller {
private SourceList sourceList = new SourceList();
public Controller() {
SourceListCategory categoryA = new SourceListCategory("Network");
SourceListCategory categoryB = new SourceListCategory("Local");
sourceList.getModel().addCategory(categoryA);
sourceList.getModel().addItemToCategory(new SourceListItem("Printer"), categoryA);
sourceList.getModel().addItemToCategory(new SourceListItem("Router"), categoryA);
sourceList.getModel().addItemToCategory(new SourceListItem("FileServer"), categoryA);
sourceList.getModel().addCategory(categoryB);
sourceList.getModel().addItemToCategory(new SourceListItem("Home"), categoryB);
sourceList.getModel().addItemToCategory(new SourceListItem("Music"), categoryB);
sourceList.getModel().addItemToCategory(new SourceListItem("Pictures"), categoryB);
}
public JComponent getSourceListComponent() {
return sourceList.getComponent();
}
}
You can then drag the SourceList's component directly out of the controller and lay it out as a normal component. Please note that GUIDE is meant to prevent you from editing these components, but I've just noticed that it's doing it in this case. Bug fix to follow.