Run the code:
@Override
public void start(Stage stage) throws Exception {
VBox root = new VBox();
root.getChildren().addAll(
MenuBarBuilder.create().menus(
MenuBuilder.create().text("File").items(MenuItemBuilder.create().text("New").build()).build(),
MenuBuilder.create().text("Help").items(MenuItemBuilder.create().text("About").build()).build()).build(), new Button("Button"));
Scene scene = new Scene(root, 500, 500);
stage.setScene(scene);
stage.show();
stage.setTitle(VersionInfo.getRuntimeVersion());
}
Click the button
Press the TAB key
Focus is on the button still.
@Override
public void start(Stage stage) throws Exception {
VBox root = new VBox();
root.getChildren().addAll(
MenuBarBuilder.create().menus(
MenuBuilder.create().text("File").items(MenuItemBuilder.create().text("New").build()).build(),
MenuBuilder.create().text("Help").items(MenuItemBuilder.create().text("About").build()).build()).build(), new Button("Button"));
Scene scene = new Scene(root, 500, 500);
stage.setScene(scene);
stage.show();
stage.setTitle(VersionInfo.getRuntimeVersion());
}
Click the button
Press the TAB key
Focus is on the button still.
- relates to
-
JDK-8122013 Menu bar doesn't get to the focused state
-
- Closed
-