How can I make two windows on jetpack compose desktop and going from window to another when I click button for example?
fun main() = application {
Window(
onCloseRequest = ::exitApplication,
title = "Products Manager",
state = rememberWindowState(width = 700.dp, height = 600.dp)
) {
val count = remember { mutableStateOf(0) }
MaterialTheme {
Column(Modifier.fillMaxSize(), Arrangement.spacedBy(5.dp)) {
Button(modifier = Modifier.align(Alignment.CenterHorizontally),
onClick = {
count.value++
}) {
Text(if (count.value == 0) "Hello World" else "Clicked ${count.value}!")
}
Button(modifier = Modifier.align(Alignment.CenterHorizontally),
onClick = {
count.value = 0
}) {
Text("Reset")
}
}
}
}
}