You must think different.
A UI builder is nothing but an application like the others. Instead of handling, let say, bank account, you'll handle "beans".
java provides a wide set of generic tools to handle beans. That's you model.
To handle a "Bean" you must put it into a "handler box". Something like a panel, with layeredpane and an opaque glasspane ( with transparent color). This will enable you to generically display beans, but catch all the click, and drag gesture, and even draw overlay.
It's the same for a Container. Except that you'll have to handle the drag and drop based on the actual layout for it. I've never seen a visual builder that can handle "generic" layouts. There is always a Handler class for every LayoutManager. Most of the difference between UI builder comes from the quality of their LayoutManager HandlerSSS
Then, at last, when you have a tree of beans, you can generate code, or XML description, to makes it possible to access the actual view at runtime.