JavaFX how to close a window without closing the application javafx [duplicate]











up vote
-1
down vote

favorite













This question already has an answer here:




  • How to close a java window with a button click - JavaFX Project

    5 answers



  • How to Exit primaryStage while opening a new stage in javafx

    3 answers




example:



on the login screen (screen 1) I enter the data and click on the 'Login' button, calling the main screen (screen 2)



How to close screen 1 and only screen 2 appear?



already tried, but closes the entire application:
 System.exit () and Platform.exit ();










share|improve this question













marked as duplicate by fabian javafx
Users with the  javafx badge can single-handedly close javafx questions as duplicates and reopen them as needed.

StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Nov 11 at 0:55


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.



















    up vote
    -1
    down vote

    favorite













    This question already has an answer here:




    • How to close a java window with a button click - JavaFX Project

      5 answers



    • How to Exit primaryStage while opening a new stage in javafx

      3 answers




    example:



    on the login screen (screen 1) I enter the data and click on the 'Login' button, calling the main screen (screen 2)



    How to close screen 1 and only screen 2 appear?



    already tried, but closes the entire application:
     System.exit () and Platform.exit ();










    share|improve this question













    marked as duplicate by fabian javafx
    Users with the  javafx badge can single-handedly close javafx questions as duplicates and reopen them as needed.

    StackExchange.ready(function() {
    if (StackExchange.options.isMobile) return;

    $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
    var $hover = $(this).addClass('hover-bound'),
    $msg = $hover.siblings('.dupe-hammer-message');

    $hover.hover(
    function() {
    $hover.showInfoMessage('', {
    messageElement: $msg.clone().show(),
    transient: false,
    position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
    dismissable: false,
    relativeToBody: true
    });
    },
    function() {
    StackExchange.helpers.removeMessages();
    }
    );
    });
    });
    Nov 11 at 0:55


    This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

















      up vote
      -1
      down vote

      favorite









      up vote
      -1
      down vote

      favorite












      This question already has an answer here:




      • How to close a java window with a button click - JavaFX Project

        5 answers



      • How to Exit primaryStage while opening a new stage in javafx

        3 answers




      example:



      on the login screen (screen 1) I enter the data and click on the 'Login' button, calling the main screen (screen 2)



      How to close screen 1 and only screen 2 appear?



      already tried, but closes the entire application:
       System.exit () and Platform.exit ();










      share|improve this question














      This question already has an answer here:




      • How to close a java window with a button click - JavaFX Project

        5 answers



      • How to Exit primaryStage while opening a new stage in javafx

        3 answers




      example:



      on the login screen (screen 1) I enter the data and click on the 'Login' button, calling the main screen (screen 2)



      How to close screen 1 and only screen 2 appear?



      already tried, but closes the entire application:
       System.exit () and Platform.exit ();





      This question already has an answer here:




      • How to close a java window with a button click - JavaFX Project

        5 answers



      • How to Exit primaryStage while opening a new stage in javafx

        3 answers








      javafx






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 11 at 0:43









      Eduardo Spagna

      12




      12




      marked as duplicate by fabian javafx
      Users with the  javafx badge can single-handedly close javafx questions as duplicates and reopen them as needed.

      StackExchange.ready(function() {
      if (StackExchange.options.isMobile) return;

      $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
      var $hover = $(this).addClass('hover-bound'),
      $msg = $hover.siblings('.dupe-hammer-message');

      $hover.hover(
      function() {
      $hover.showInfoMessage('', {
      messageElement: $msg.clone().show(),
      transient: false,
      position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
      dismissable: false,
      relativeToBody: true
      });
      },
      function() {
      StackExchange.helpers.removeMessages();
      }
      );
      });
      });
      Nov 11 at 0:55


      This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.






      marked as duplicate by fabian javafx
      Users with the  javafx badge can single-handedly close javafx questions as duplicates and reopen them as needed.

      StackExchange.ready(function() {
      if (StackExchange.options.isMobile) return;

      $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
      var $hover = $(this).addClass('hover-bound'),
      $msg = $hover.siblings('.dupe-hammer-message');

      $hover.hover(
      function() {
      $hover.showInfoMessage('', {
      messageElement: $msg.clone().show(),
      transient: false,
      position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
      dismissable: false,
      relativeToBody: true
      });
      },
      function() {
      StackExchange.helpers.removeMessages();
      }
      );
      });
      });
      Nov 11 at 0:55


      This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.































          active

          oldest

          votes






















          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes

          Popular posts from this blog

          Full-time equivalent

          Bicuculline

          さくらももこ