To reproduce:
1) start an app below;
2) move mouse cursor to the second menu;
3) press ALT key twice;
4) click mouse button
Both the second and the first menu buttons will be selected unexpectedly.
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.*;
import javafx.scene.layout.HBox;
import javafx.stage.Stage;
public class App extends Application {
public static void main(String[] args) {
launch(args);
}
@Override
public void start(Stage stage) throws Exception {
MenuBar control = new MenuBar();
for (int i = 0; i < 5; i++) {
Menu m = new Menu("Menu " + String.valueOf(i + 1));
for (int j = 0; j < 5; j++) {
m.getItems().add(new MenuItem("Item " + String.valueOf(j + 1)));
}
control.getMenus().add(m);
}
Scene scene = new Scene(new HBox(control));
stage.setScene(scene);
stage.show();
}
}
1) start an app below;
2) move mouse cursor to the second menu;
3) press ALT key twice;
4) click mouse button
Both the second and the first menu buttons will be selected unexpectedly.
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.*;
import javafx.scene.layout.HBox;
import javafx.stage.Stage;
public class App extends Application {
public static void main(String[] args) {
launch(args);
}
@Override
public void start(Stage stage) throws Exception {
MenuBar control = new MenuBar();
for (int i = 0; i < 5; i++) {
Menu m = new Menu("Menu " + String.valueOf(i + 1));
for (int j = 0; j < 5; j++) {
m.getItems().add(new MenuItem("Item " + String.valueOf(j + 1)));
}
control.getMenus().add(m);
}
Scene scene = new Scene(new HBox(control));
stage.setScene(scene);
stage.show();
}
}
- duplicates
-
JDK-8167139 Menu's selection disappears on collapsing
- Resolved
- relates to
-
JDK-8167139 Menu's selection disappears on collapsing
- Resolved
-
JDK-8167139 Menu's selection disappears on collapsing
- Resolved