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 8636147
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T10:09:22+00:00 2026-06-12T10:09:22+00:00

I have problem with displaying modal dialog and busy cursor at the same time.

  • 0

I have problem with displaying modal dialog and busy cursor at the same time.

I display a modal dialog and set the cursor of the main frame on “waiting state”. Everything is fine, except that if the mouse exits the main frame and enters again, it never comes back on “waiting state”. This bug (?) doesn’t happen if the dialog is not modal.

The test program:

    public static void main(String[] args) {
        final JFrame frame = new JFrame();
        frame.setSize(new Dimension(500, 500));

        final JDialog dialog = new JDialog(frame);
        dialog.setModal(true);

        frame.add(new JButton(new AbstractAction("Dialog") {
            @Override
            public void actionPerformed(ActionEvent e) {
                frame.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
                dialog.setVisible(true);
            }
        }));
        frame.setVisible(true);
    }
  • 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-12T10:09:24+00:00Added an answer on June 12, 2026 at 10:09 am

    frame.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));

    • Cursor is possibe to change (or change is visible) for window that have got focus, this is basic properties for Modal window or for ModalityTypes,

    it never comes back on “waiting state”. This bug (?) doesn’t happen if the dialog is not modal.

    • after child JDialog is closed, then JFrame could be changed Cursor to WAIT_CURSOR

    • you to visible the changed Cursor by removing setModal() or to change changing ModalityTypes to the ModalityType.MODELESS

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

Sidebar

Related Questions

I have a problem with displaying modal dialog in center of the owner form.
I am having a problem displaying/editing a date in MVC 3. I have set
I have problem with displaying adsense ads in ie7 google adsense adds an iframe
I have a problem displaying non- ASCII characters in Matplotlib, these characters are rendered
I have a problem displaying zebra list after filtering results. I have a zebra
I'm generating dynamic HTML inside Delphi. I have no problem displaying UTF-8 strings inside
I have some problem with displaying emoji icon in Android TextView First, I found
I have a problem consistently displaying Facebook Comments on my AJAX driven website. Each
I have a problem with using jQuery Dialog and Ajax submit in JSF. I
I have a form ( Payment.php ) which I am displaying in a modal

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.