This question already has an answer here:
- JavaFX 2 custom popup pane 1 answer
I want to create a popup windows in javafx application.give me some idea.
when i click on check button open popup windows. how to do?
This question already has an answer here:
I want to create a popup windows in javafx application.give me some idea.
when i click on check button open popup windows. how to do?
You can either create a new
Stage
, add your controls into it or if you require the POPUP asDialog
box, then you may consider using DialogsFX or ControlsFX(Requires JavaFX8)For creating a new Stage, you can use the following snippet
If you don't want it to be
modal
(block other windows), use:The Popup class might be better than the Stage class, depending on what you want. Stage is either modal (you can't click on anything else in your app) or it vanishes if you click elsewhere in your app (because it's a separate window). Popup stays on top but is not modal.
See this Popup Window example.
Take a look at jfxmessagebox (http://en.sourceforge.jp/projects/jfxmessagebox/) if you are looking for very simple dialog popups.
Have you looked into ControlsFx Popover control.
This is only an example but a PopOver sounds like it could accomplish what you want. Check out the documentation for more info.
Important note: ControlsFX will only work on JavaFX 8.0 b118 or later.