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

  • Home
  • SEARCH
  • 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 7670169
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T15:45:38+00:00 2026-05-31T15:45:38+00:00

I´m starting with JavaFX and got stucked on a performace problem. I´ll try to

  • 0

I´m starting with JavaFX and got stucked on a performace problem. I´ll try to explain instead of paste the code because it´s too long and not centralized.

I started my Application, invoke the launch method and received the Stage object. Until now, that´s all OK.

Now I start to create my structure with Groups. I created my first Group (lets call it ‘A’) and set it with setRoot() on the Stage. Then create 3 other groups (each with a complex structure of leafs) and add each one as child of the first Group (the one we call ‘A’).

The problem: I´d like to update just one of Group structure, without doing all of them and call setRoot() again on Stage object.
– But if I try to remove it from the parent I got a exception “java.lang.IllegalStateException: Not on FX application thread;”.
– If I try to put it on another Group, I still get the same exception.

Is there any way I can reuse the group I already made, or just replace the group I need to remake?

I tried to explain at most my problem, but since english is not my natural language I hope u can understand 😉

Thanks in advance…

  • 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-05-31T15:45:39+00:00Added an answer on May 31, 2026 at 3:45 pm

    Not on FX application thread; means you run UI operations on the wrong thread. Modifying UI should happen only on UI thread (aka “FX application thread”), otherwise it would be impossible to synchronize UI operations. To achieve that use next code:

    Platform.runLater(new Runnable() {
       public void run() {
           A.getChildren().clear(); // or whatever operation you need
       }
    });
    

    where Platform is javafx.application.Platform

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

Sidebar

Related Questions

Starting in SQL 2005, VARCHAR(MAX) is no longer limited to 8000 bytes, it instead
I've got problems starting my WAR application on a local JBoss. After two other
I have a JavaFX app with a some code like this... public class MainListener
I have problem with using Hibernate Validator with GWT 2.4. When module is starting
Here's my problem, I'm using the following java code using JMF for playing video.
In the following code I've created a JTable in class main and I'm starting
I am starting with the code which was found here and can be seen
When starting WebSphere, I get this exception: Could not instantiate bean class [org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter]: Constructor
After taking quite a long break from active coding I am just starting to
I am just starting to learn JavaFX 2. Now I am trying to build

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.