Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Managing javafx.stage.Popup

Pete MossJun 1 2014 — edited Jun 4 2014

I have a case where I want to float a modeless popup on top of all other content. Seems like a Popup is ideal for this. Except for the following annoyances:

  1. I don't see any way to tie its position to some owner window. You can supply an initial anchor position, but I noticed that if I drag the frame of the app window containing the JavaFX application, the Popup remains where it is and can actually appear outside the bounds of the App! I find this very disconcerting. I suppose I could bind its position to the screen coords of the Stage, but it would seem that I should not have to do this.
  2. If I minimize the app, the Popup remains visible. Rather odd given that when I called Popup.show(Window), you would think when the owner Window got hidden it would hide the owned Popups too. Again, I could probably bind to some property on the Stage, but like (1), it seems you should not have to do this.

Am I missing something obvious?

I haven't tried this while embedding the Scene in a browser. I certainly hope that these Popups should not be allowed outside the bounds of the browser window. That spells trouble.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 2 2014
Added on Jun 1 2014
4 comments
2,356 views