Skip to content
cccskills
FreePublished on GitHub

jewel-swing-interop

Embed Jewel Compose UI in Swing hosts, including IntelliJ tool window tabs and generic panels. The guidance selects an appropriate bridge API, applies Swing theme integration, and handles component access, compositing, and version-specific behavior.

OriginalShow the original description

Embed Jewel Compose UI in Swing.

JetBrains/intellij-community20,664 stars(GitHub 20,664 + cccskills 0)

Run score Not tested

See how to install

Good for

  • Adding a Compose tab to an IntelliJ tool window
  • Embedding a composable in a Swing panel
  • Applying Swing look and feel to Compose UI
  • Connecting Compose callbacks to Swing dialogs

Files included (2)

  • SKILL.md4.1 KB
  • skill-source.json1021 B

SKILL.md (original)

Review the instructions the agent will receive before you install.

<!-- Generated by community/.ai/render-guides.mjs; edit community/.agents/skills/jewel-swing-interop/SKILL.md -->

Jewel Swing Interop

Embed Compose/Jewel into Swing with bridge primitives from ide-laf-bridge and foundation.

Quick Snippets

Tool window tab:

toolWindow.addComposeTab(tabDisplayName = "My Tab") {
    SwingBridgeTheme {
        MyToolWindowContent()
    }
}

Generic Swing host:

val panel = JewelComposePanel {
    MyPluginComposable()
}

Manual compositing enablement (non-toolwindow entrypoint):

enableNewSwingCompositing()
val panel = JewelComposePanel { MyPluginComposable() }

Use The Highest-Level API First

Pick the simplest valid entrypoint:

  1. Tool window tab: ToolWindow.addComposeTab(...).
  2. Generic Swing host: compose(...) / JewelComposePanel(...).
  3. Custom theming flow: composeWithoutTheme(...) / JewelComposeNoThemePanel(...).

Default to themed entrypoints; use no-theme variants only when theme wrapping is intentionally external.

Enable New Swing Compositing Early

Call enableNewSwingCompositing() before attaching Compose content when needed.

Notes:

  1. ToolWindow.addComposeTab(...) already does this internally.
  2. The function is idempotent and safe at multiple entry points.
  3. This improves z-order/resizing behavior but can affect performance with infinitely repeating animations.
  4. Treat enableNewSwingCompositing() and no-theme entrypoints as advanced/experimental paths.

Apply Bridge Theme In Plugin Context

Use SwingBridgeTheme for IntelliJ plugin UI:

  1. Pulls Swing LaF colors/metrics/typography into Compose.
  2. It provides bridge composition locals for icon and new-UI behavior, clipboard access, density scaling, shortcuts, and URI handling.

Do not use standalone IntUiTheme for plugin-hosted Swing integration.

Bridge Compose To Swing/AWT Safely

For bidirectional operations:

  1. Use LocalComponent to get the host Swing component when APIs require Component.
  2. Use bridge utilities for color conversion and LaF key lookup when styling custom interop elements.
  3. Delegate file chooser and dialog operations to Swing (JFileChooser, etc.) from Compose callbacks.

Version Discipline

Treat this skill as Jewel-version scoped.

  1. Ask for target IntelliJ Platform baseline and Jewel API version.
  2. Validate behavior against Jewel release notes when APIs differ by platform generation.
  3. Prefer high-level bridge entrypoints that are stable in target versions.
  4. For shipped skill updates, refresh reference links to the corresponding release tag.

Interop Checklist

Before finishing:

  1. Confirm compositing flag is set at proper entrypoints.
  2. Confirm theme wrapper is SwingBridgeTheme (unless deliberately no-theme).
  3. Confirm host component access uses LocalComponent.
  4. Confirm toolwindow integrations use addComposeTab when applicable.
  5. Confirm interop code avoids creating extra unmanaged ComposePanel wrappers.

References

Read these source files when implementing:

  1. ToolWindowExtensions.kt
  2. JewelComposePanelWrapper.kt
  3. SwingBridgeTheme.kt
  4. Compatibility.kt (enableNewSwingCompositing)
  5. README Swing interoperability section

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

actions

FreeSummary

Implement or update IntelliJ `AnAction` classes and their `plugin.xml` registrations. Keep labels and descriptions in message bundles, configure optional icons, and launch suspending work through the event coroutine scope so synchronous action handling does not freeze the IDE.

  • Adding a new IntelliJ action
  • Updating an action's registration or icon
  • Moving action labels into a message bundle
JetBrains/intellij-community20.7KUpdated Oct 26, 2026

Move IntelliJ JPS test modules to Bazel and diagnose failures that occur only under Bazel. The guide helps trace missing dependencies, plugins, test data, and runfiles, then verify the generated target and migrated tests.

  • Migrating a JPS test module to Bazel
  • Diagnosing a test failure that occurs only in Bazel
  • Checking Bazel dependencies and test data wiring
JetBrains/intellij-community20.7KUpdated Oct 26, 2026

code-style

FreeSummary

Write or review Kotlin and Java code in line with IntelliJ project conventions. The guidance covers language choice, formatting, sealed types, threading annotations, and safe handling of control flow exceptions so changes fit the surrounding codebase.

  • Writing a new Kotlin file that follows IntelliJ conventions
  • Reviewing Java code and checking its style guidance
  • Checking formatting, sealed-type handling, or exception handling
JetBrains/intellij-community20.7KUpdated Oct 26, 2026

commits

FreeSummary

Create, amend, or rename IntelliJ commits with messages that follow the project’s ticket and label formats. Keep each commit focused, explain the reason and decision in the body when needed, and pass the message safely through the shell or PowerShell.

  • Writing a message for a change linked to a YouTrack ticket
  • Preparing a commit message for tests, cleanup, or documentation
  • Amending or renaming an existing IntelliJ commit
JetBrains/intellij-community20.7KUpdated Oct 26, 2026

Compare how Python type checkers interpret a code snippet or file. The script runs selected tools, including ty, pyrefly, basedpyright, mypy, and zuban, then produces a Markdown report with verdicts, timings, and each checker's diagnostic output.

  • Comparing type inference for a Python snippet
  • Checking whether a Python expression should be a type error
  • Reviewing differences among Python type checkers
JetBrains/intellij-community20.7KUpdated Oct 26, 2026

Shape Compose Desktop UI code by keeping composables focused on rendering and placing application decisions in presenters or coordinators. Get guidance on state ownership, effects, reusable component APIs, lazy-list keys, animation, and performance for individual UI changes.

  • Separating screen rendering from application decisions
  • Choosing which UI state belongs in composition
  • Structuring effects and coroutine work
JetBrains/intellij-community20.7KUpdated Oct 26, 2026

See all skills by JetBrains

Report a problem with this skill