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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T06:14:50+00:00 2026-06-14T06:14:50+00:00

I have a javafx editable ComboBox. The value property is updated only when i

  • 0

I have a javafx editable ComboBox.
The value property is updated only when i press enter, and not just exiting the ComboBox.
It seems to me to be a bug and not a design feature because it would be strange that a non focused control shows a value that is not reflected by its value property.

Here is an SSCE that shows the problem:

import javafx.application.Application;
import javafx.beans.*;
import javafx.scene.Scene;
import javafx.scene.control.*;
import javafx.scene.layout.VBox;
import javafx.stage.Stage;

public class T02 extends Application {

public static void main (String [] args) { launch(args); }

@Override public void start(Stage stage) throws Exception {

    System.out.println("javafx.runtime.version: " + System.getProperties().get("javafx.runtime.version"));

    VBox vbox = new VBox();

    //this combobox is the object of the investigation
    final ComboBox comboBox = new ComboBox();
    comboBox.setEditable(true);
    vbox.getChildren().add(comboBox);

    //I need another component just to allow the ComboBox to loose the focus
    TextField textField = new TextField();
    vbox.getChildren().add(textField);

    //And here it is: when comboBox looses focus, i print its state
    comboBox.focusedProperty().addListener(new InvalidationListener() {
        @Override public void invalidated(Observable observable) {
            //return if it has the focus: i am just interested on focus lost
            if (comboBox.focusedProperty().get()) {return;}
            System.out.println(comboBox.getValue());
        }
    } );

    stage.setScene(new Scene(vbox));
    stage.show();
}

}

output:
[write something on combo and click on the other control (or press tab, it’s the same)]
null
[click back on the combo, press enter and click down on the text field]
hello

The first null is strange, maybe buggy as I said before. I did a quick search on jira and haven’t found this behavior. (Maybe i haven’t noticed it)

update
Ok, i’ve just added the

System.out.println("javafx.runtime.version: " + System.getProperties().get("javafx.runtime.version"));

and get the result:

javafx.runtime.version: 2.1.something

I’ve upgraded the version with the last available:

javafx.runtime.version: 2.2.3-b05

And the issue disappears.

  • 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-14T06:14:52+00:00Added an answer on June 14, 2026 at 6:14 am

    The related bug which was fixed in RT-21454 ComboBox value should update when focus leaves it.

    Update

    AgostinoX reports that the issue is resolved by upgrading to JavaFX 2.2.3-b05.

    You can check the javafx version you are using by placing the following code inside your JavaFX application’s start method.

    System.out.println("javafx.runtime.version: " + System.getProperties().get("javafx.runtime.version"));
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have just explore javaFX. I am now programming modul based application by netBeans
I have just started digging into JavaFX and have a requirement that I am
I'm learning JavaFX and this is just a small programming question. I have 3
Does it make sense to start learning JavaFx if I do not have any
We have created an applet with javafx and it seems that in order to
I have applied CSS style to JavaFX components and it looks like everything is
I have this easy little form in my JavaFX application. I want to use
I have a problem with a Context menu in JavaFx 2:it never disappers when
Does JavaFX 2.0 supports printing? I have a text area from which I take
I am new to JavaFX 2.0 and to do practice I have followed the

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.