This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Switching over multiple windows with static GUI's  RSS feed

 
shalini chaurasia
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Switching over multiple windows so that window should be static and content should be dynamic while switching.
 
John Damien Smith
Ranch Hand
Posts: 350
21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Construct a new scene for the new content and invoke stage.setScene(nextScene) when you want to change the content.

If you just want to update a portion of the scene (e.g. a panel and not the whole scene), then replace the panel content with your new content.

If your application is fxml based and you want to load a new fxml for the new scene or have transitions between the scene content, then see this tutorial on managing multiple screens in JavaFX

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!