2

I have created a screen for my GUI like this . enter image description here

Now after the program starts i just want to show the user FirstBtn like this:enter image description here

and after the button is clicked the screen moves in the direction of the arrow in the picture and goes to the secondBtn enter image description here

now how should i move the screen and change the view port.

Gandalf
  • 2,921
  • 5
  • 31
  • 44
  • Do you wish to center the second button in the viewport after the first button is clicked? Perhaps this [SO question](http://stackoverflow.com/questions/12837592/how-to-scroll-to-make-a-node-within-the-content-of-a-scrollpane-visible) may help you. – Kent Shikama May 17 '14 at 06:27

1 Answers1

0

You may use different scenes for the same stage.

 primayStage.setScene(yourScene1);

and same when needed for yourScene2

primayStage.setScene(yourScene2);
Zaid Sultan
  • 78
  • 1
  • 9