Skip to content

Commit

Permalink
8324239: JFXPanelHiDPITest fails on Windows 11
Browse files Browse the repository at this point in the history
Reviewed-by: angorya, kcr
  • Loading branch information
prsadhuk committed Jan 29, 2024
1 parent 767b027 commit 876d535
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import java.util.concurrent.TimeUnit;

import com.sun.javafx.PlatformUtil;

import javafx.application.Platform;
import javafx.embed.swing.JFXPanel;
import javafx.embed.swing.JFXPanelShim;
Expand All @@ -56,6 +57,7 @@
import static org.junit.Assert.fail;
import static org.junit.Assume.assumeTrue;

import test.util.Util;
import static test.util.Util.TIMEOUT;

public class JFXPanelHiDPITest {
Expand All @@ -82,7 +84,7 @@ public static void setupOnce() throws Exception {
launchLatch = new CountDownLatch(1);

// Start the Application
SwingUtilities.invokeLater(() -> myApp = new MyApp());
SwingUtilities.invokeAndWait(() -> myApp = new MyApp());

assertTrue("Timeout waiting for Application to launch",
launchLatch.await(5 * TIMEOUT, TimeUnit.MILLISECONDS));
Expand Down Expand Up @@ -149,7 +151,7 @@ public MyApp() {
}

private void createScene(final JFXPanel fxPanel) {
Platform.runLater(() -> {
Util.runAndWait(() -> {
StackPane root = new StackPane();

Rectangle rect = new Rectangle(PANEL_WIDTH - 100, (double) PANEL_HEIGHT / 8);
Expand Down

1 comment on commit 876d535

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.