CodeName OneShai Almog9 min readintermediate
The Third-Generation GUI Builder: One Workspace for Every Form
Summary
Codename One’s third‑generation GUI Builder turns the editor into a Maven‑aware project workspace: it scans all `.gui` files, shows live CSS, and protects generated Java regions, keeping Steve Hannah’s guided `LayeredLayout` model while eliminating per‑form editor launches.
- The editor is now launched via a single Maven goal (`mvn cn1:guibuilder`) that binds the whole project, avoiding separate processes for each form.
- Guided layout survives the rewrite; relationships are stored by component name, not absolute coordinates, and persist across saves.
- Live CSS editing updates the preview instantly, using the same `theme.css` compiled for the app—no separate theme model.
- Generated Java code is split into protected `<gui-builder-generated>` and user‑editable `<gui-builder-user-code>` regions, preventing accidental overwrites.
By treating the whole Maven project as the unit of work, the GUI Builder eliminates the navigation overhead that plagued earlier versions, making visual UI development scalable for larger apps. Preserving guided layout while exposing live CSS and protected code regions bridges the gap between visua…
6/10