Codename One Now Lets Dialogs Open as Native Desktop OS Windows

Codename One, an open-source framework for building cross-platform apps from a single Java or Kotlin codebase, has released a fix via PR #5624 that allows dialogs to appear as real modal desktop operating-system windows. The update addresses a bug where Dialog.show() was incorrectly targeting the wrong surface when multiple native windows were open. Developers can enable this behavior app-wide using Dialog.setDefaultNativeWindowMode(true) or on a per-instance basis, while ports without native window support automatically fall back to lightweight dialogs. The fix also corrects several components — including Dialog, ComboBox, and ToastBar — that previously conflated 'top level' with 'form', causing incorrect behavior in multi-window environments. Native-window mode is recommended when a dialog needs to participate in desktop window ordering or task switching, while lightweight mode remains the default for simpler prompts.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in