Kirill Grouchnikov
08/09/2022, 10:01 PMComposePanel
is used.Igor Demin
08/10/2022, 11:57 AMKirill Grouchnikov
08/22/2022, 1:44 PMIgor Demin
09/16/2022, 10:25 AMThomas
09/16/2022, 10:29 AMIgor Demin
09/16/2022, 10:33 AMComposeWindow
? The issue above is about ComposePanel
.
ComposeWindow
flashes can be fixed this way:
fun main() = SwingUtilities.invokeLater {
val window = ComposeWindow()
window.size = Dimension(400, 400)
window.setContent {
App()
}
window.makeDisplayable()
window.contentPane.paint(window.graphics)
window.isVisible = true
}
internal fun Window.makeDisplayable() {
val oldPreferredSize = preferredSize
preferredSize = size
try {
pack()
} finally {
preferredSize = oldPreferredSize
}
}
And it is used inside Composable Window
Maybe that helps you point to the underlying issueAnyway, it seems we can use this for ComposePanel. Worth to try