Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Change pane with menu item select  RSS feed

 
Jeyaganeshan Jeyatharsini
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In my FXML code I use TitlePane.. Into that there is BorderPane... Into the BorderPane I have another pane... I have some FXML code with Pane... I want to change my innermost pane from my collection of external pane.fxml when every menu item is clicked through Java code. Can it be done? How to do it?
 
John Damien Smith
Ranch Hand
Posts: 337
21
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Take a look at this sample of swapping a node based upon selections in a "menu":
http://stackoverflow.com/questions/13556637/how-to-have-menus-in-java-desktop-application
The sample does not use FXML or a menubar (the menu is a vbox of hyperlinks), but hopefully it demonstrates enough concepts that you can see how this might be done.

For something FXML based, you could look at this small framework for loading new fxml in the same scene:
http://stackoverflow.com/questions/18619394/loading-new-fxml-in-the-same-scene
 
Jeyaganeshan Jeyatharsini
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are a genius!... It solves my problem.. thanks again!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!