Kotlin UI DSL Components - marked unstable with @ApiStatus.Experimental & issues with combo box



I am trying to work with the Kotlin UI DSL Components and using the example source code in the UI DSL Showcase. When I use the exact syntax shown I get a warning message that states:

'panel(kotlin.jvm.functions.Function1<? super com.intellij.ui.dsl.builder.Panel,kotlin.Unit>)' is marked unstable with @ApiStatus.Experimental

The only way to suppress these messages is to add a @Suppress. Also I noticed that the combo box does not accept a listOf as shown in the examples (error message: None of the following functions can be called with the arguments supplied). Instead I had to use arrayOf.

The question is, are the UI components in the Kotlin DSL experimental I should therefore with confidence only use Swing?

Also, regarding the combobox, is there a reason why it will not accept listOf?

val panel: JPanel = panel {
row {

row {
button("button") {}

row("comboBox:") {
comboBox(arrayOf("Volvo", "BMW", "Ford", "Mazda"))
评论操作 固定链接


I'm sorry, but it's unclear what the issues are. Please clarify the exact APIs you are trying to use (packages, function headers).