Browse Source

Wordsmith swing interop API description (#500)

We've been seeing an antipattern where people are literally "passing a view/jcomponent" into the interop API by merely referencing the native object in the factory lambda.  This usage is very much an antipattern.  Wordsmithing a bit to avoid putting that idea into people's minds.
pull/502/head 0.4.0-build174
jimgoog 4 years ago committed by GitHub
parent
commit
f9e6283c5b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      tutorials/Swing_Integration/README.md

2
tutorials/Swing_Integration/README.md

@ -149,7 +149,7 @@ fun Counter(text: String, counter: MutableState<Int>) {
## Adding a Swing component to CFD composition using SwingPanel.
SwingPanel lets you create a UI using Swing components in a Compose-based UI. To achieve this you need to create Swing component and pass it as a parameter to SwingPanel.
SwingPanel lets you create a UI using Swing in a Compose-based UI. To achieve this you need to create Swing `JComponent` in the `factory` parameter of `SwingPanel`.
```kotlin
import androidx.compose.desktop.SwingPanel

Loading…
Cancel
Save