About JDK-8371781. I understood the problem. The window seems to be created but 
it is not visible. I recorded a GIF that clearly shows the issue (it is about 
15 seconds long, watch until the label text changes) - https://ibb.co/n8Y42bNy

I hope, it will help.

Test code:

public class Test1 extends Application {

    private final Label label = new Label("Miracles don’t happen.");

    @Override
    public void start(Stage stage) {
        MenuItem item = new MenuItem("Click me!");
        item.setOnAction(e -> {
            label.setText("It’s a miracle!");
        });
        Menu menu = new Menu("Menu");
        menu.getItems().add(item);
        MenuBar bar = new MenuBar(menu);

        var stackPane = new StackPane(label);
        VBox.setVgrow(stackPane, Priority.ALWAYS);
        label.setStyle("-fx-font-size: 30");
        VBox root = new VBox(bar, stackPane);

        Scene scene = new Scene(root, 400, 400);
        stage.setScene(scene);
        stage.setTitle("JDK-8371781");
        stage.show();
    }

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

Best regards, Pavel

On 11/18/25 18:21, Kevin Rushforth wrote:
Regarding the second issue, JDK-8372108, I will add your additional information 
as a comment and reopen the bug.

Regarding the first issue, I see the following, which I presume is the one you 
filed?

JDK-8371781: Popup for ComboBox, Menu, and Tooltip is not shown sometimes in 
JavaFX

I don't know why you didn't receive notification when it was processed and 
transferred to the JDK project in JBS. I see that it was closed as not 
reproducible. Do you have additional information that would help reproduce it?

-- Kevin


On 11/18/2025 8:06 AM, PavelTurk wrote:
Hello everyone,

On November 10, I opened an issue (using the new redesigned form), and the 
system showed me the ID 23c3711c-36b1-4b94-a0d3-25bbdcf1b95f. The issue was 
about the fact that PopupWindow is not always shown on Linux systems, and I 
described how to reproduce the bug using a Tooltip. However, I still haven’t 
received any information about my issue.

On November 16, I opened another issue (using the old form) about a memory leak 
in Tab that is related to GRAPHIC. Today I received a message that the issue is 
JDK-8372108. However, my issue was immediately closed with a note saying that 
it is a duplicate of JDK-8283449. But it is NOT a duplicate. JDK-8283449 is 
related to a problem in ContextMenu. I know this issue and I use the following 
workaround:

contextMenu.getProperties().put(KEY, new WeakReference<Tab>(tab));

MenuItem close = new MenuItem(..);
close.setOnAction((e) -> {
      var t = getTab(contextMenu); // from properties
});

The issue I reported is related to |graphic|. So I believe that there are TWO 
separate problems with tabs that lead to memory leaks.

Best regards, Pavel



Reply via email to