proomt

Search

Search posts, papers, and topics

All posts

CodeName OneShai Almog3 min readintermediate

A Dialog Can Now Be a Native Desktop Window

Summary

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.

  • Dialog.show() can now render as a native modal desktop window, configurable globally via `setDefaultNativeWindowMode(true)` or per-instance.
  • The core fix involved correctly identifying the event source component's top-level container, rather than assuming a single 'current form'.
  • Native dialogs participate in desktop window ordering, focus, and task switching, unlike lightweight dialogs painted inside their owner.
  • Popups (e.g., combo-boxes, tooltips) remain lightweight; native mode is specifically for `Dialog` and `InteractionDialog` instances.

Engineers building multi-window desktop applications with Codename One will find this crucial for correct UI behavior, focus management, and security.

7/10

Related reading

  1. One App, More Than One Native Window

    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…

    CodeName Onecodenameone.com11 min
  2. Fill an SMS Verification Code Without Reading the Inbox

    Codename One adds a one‑time‑code autofill component that leverages iOS, Android, and browser autofill APIs, eliminating the need for SMS‑reading permissions. The new `PhoneVerification` component handles phone entry, code entry, resend timing, and server callbacks, while the UI uses a single hidden editor to back six visual boxes, improving typing, paste, and accessibility. The post explains the…

    CodeName Onecodenameone.com3 min
  3. 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
  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
  5. 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