proomt

Search

Search posts, papers, and topics

All posts

CodeName OneShai Almog11 min readintermediate

One App, More Than One Native Window

Summary

Codename One now supports true native desktop windows via a new `Window` class that separates per‑surface state (paint queue, input routing, native peers) from the global `Display`. The change adds a `PaintSurface` abstraction, platform‑specific window back‑ends (AWT/Swing, Direct2D, GTK, UIWindowScene), and a migration path for components that assumed a single `Form`. Initial release has some UI…

  • A `Window` class implements `TopLevelContainer`, allowing multiple OS‑level windows on Java SE, Windows, Linux, and Mac Catalyst while keeping `Form` as the single‑window mobile model.
  • State that was previously global (current form, graphics target, paint queue) is now encapsulated in a per‑window `PaintSurface`, enabling independent repaint and input handling.
  • Input events now carry a window ID, preserving compatibility for the main surface (ID 0) and allowing the desktop ports to route events correctly.
  • Platform implementations:

Enabling true multi‑window support brings Codename One closer to native desktop ergonomics, allowing developers to build richer IDE‑style or multi‑panel applications without resorting to custom in‑form layouts. The architectural split between global app state and per‑surface state also paves the wa…

7/10

Related reading

  1. A Dialog Can Now Be a Native Desktop Window

    Codename One now supports native desktop windows for dialogs, fixing a bug where dialogs appeared on the wrong surface in multi-window applications. This allows dialogs to participate correctly in desktop window ordering and focus, with options for global or per-instance native mode.

    CodeName Onecodenameone.com3 min
  2. Native Drag and Drop Meets Cross-Device Continuity

    Codename One 8.0 adds two user‑experience primitives: **Cross‑Device Continuity** (state checkpointing + Apple Handoff + custom HTTP relay) and **Native Drag‑and‑Drop** (OS‑level drag using the same ClipboardContent model). The post shows the API (StateProvider, Continuity.checkpoint, NativeDragOperation), platform support tables, and practical advice on payload size, security, thread handling, a…

    CodeName Onecodenameone.com7 min
  3. A Mac App, Not an iOS App on a Mac

    Codename One switched its default Mac build from iOS‑Catalyst to a native AppKit port. The new path creates true NSApplication/NSWindow objects with per‑window CAMetalLayer rendering, native menus, text input, multi‑monitor support and accessibility, eliminating the costly image‑copy pipeline of Catalyst and enabling proper desktop window behavior.

    CodeName Onecodenameone.com3 min
  4. VoIP, VPN, and the Build System Behind Them

    Codename One’s new builder pipeline can automatically generate the native plumbing required for VoIP call integration, managed VPN profiles, and packet‑tunnel extensions on iOS and Android. By inspecting which Java packages an app imports, the builder adds the necessary frameworks, entitlements, services, and even a separate signed Network Extension for iOS, letting developers keep their signalin…

    CodeName Onecodenameone.com10 min