Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8328007
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T01:18:08+00:00 2026-06-09T01:18:08+00:00

Good day! I am developing a program using JavaFX SDK. I wanted to have

  • 0

Good day!
I am developing a program using JavaFX SDK. I wanted to have a message box like in C#:

DialogResult rs = MessageBox.showDialog("Message Here...");
if (rs == ....) {
    // code
}

I want to have a functionality like this using JavaFX SDK. Answers are very much appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T01:18:10+00:00Added an answer on June 9, 2026 at 1:18 am

    Update

    As of Java8u40, the core JavaFX libraries include dialog (message box) functionality. Refer to the documentation for the following classes:

    • Alert
    • Dialog (and subclasses)

    For quick info on how to use the Alert class, refer to other answers to this question:

    • by user Limited Atonemment
    • by user Andrei Krasutski

    For a longer tutorial, refer to the Makery JavaFX dialog tutorial (this tutorial is highly recommended).

    Original Answer

    Here is an example of a Modal Confirm dialog. It works by creating a Stage containing a Scene with the dialog contents in it, and then calling show() on the Scene.

    If you want the main processing thread to pause whilst the new Stage is shown and you are using JavaFX 2.2+, then you can call showAndWait() on the Stage rather than show. Modified to use show and wait and just display a message and ok button, then processing should act quite similar to a C# MessageBox.

    If you want a professional looking message box for Java 8, I recommend using the dialogs from the ControlsFX library, which is a later iteration of the dialogs in the JavaFX UI Controls Sandbox mentioned in blo0p3r’s answer.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Good day, I have like 15 images I need to be buttons. I have
Good day everyone. I have a question about making and using derived classes of
good day we are developing game for android and have some trouble with resource
Good Day, I'm developing an application in VC++ that communicates using UDP protocol with
Good Day Everyone, I have a program (lets call it 'A'), which is called
Good day. I need to teach Windows CryptoAPI to encrypt the message with private
Good day, I have a class that implements the LoaderCallbacks, and hence have the
Good day, just a quick question: I would like to bind a table to
Good day I have a custom TextBox that has a IndicatorTextBox.ui.xml file as well
Good Day, I have a simple working routine in Perl that swaps two words:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.