This discussion is archived
4 Replies Latest reply: Jan 21, 2013 1:22 PM by 985606 RSS

JavaFX real topmost window

985606 Newbie
Currently Being Moderated
Hi Guys,

How can I set real Z "topmost" window in JavaFX?

Thanks,

Roel Armas
  • 1. Re: JavaFX real topmost window
    jsmith Guru
    Currently Being Moderated
    Try
    stage.toFront()
    http://docs.oracle.com/javafx/2/api/javafx/stage/Stage.html#toFront%28%29
  • 2. Re: JavaFX real topmost window
    985606 Newbie
    Currently Being Moderated
    Hi jsmith, thanks for your help!

    When I try Stage.toFront, my window only brings on first z priority but when any other window is called, my stage is sended to back. I'm looking for method that keeps my stage window on top of any other, including OS notifications/alerts. I think that JavaFX (please correct me if I'm wrong) doesn't haves classes for this purposes. I'd read that awt could be works but, borns another question... If I use awt as a container for my JavaFX window, performace will be the same? I don't know how JavaFX render engine works so maybe this is a legitimate question with tweaks like this.

    Thanks and Regards,

    Roel Armas
  • 3. Re: JavaFX real topmost window
    jsmith Guru
    Currently Being Moderated
    When I try Stage.toFront, my window only brings on first z priority but when any other window is called, my stage is sended to back. I'm looking for method that keeps my stage window on top of any other, including OS notifications/alerts. I think that JavaFX (please correct me if I'm wrong) doesn't haves classes for this purposes.
    Yes, you are correct. That is quite an old request, created some 27700 issues ago:
    http://javafx-jira.kenai.com/browse/RT-153 "Option to keep Stages always on top".
    It currently not scheduled for implementation . . . you can comment on or vote for the request.
    If I use awt as a container for my JavaFX window, performace will be the same?
    You'd have to try it with your JavaFX window to see if the performance remains acceptable for your users.
  • 4. Re: JavaFX real topmost window
    985606 Newbie
    Currently Being Moderated
    Thanks jsmith!

    Regards

    Roel Armas

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points