-
Bug
-
Resolution: Cannot Reproduce
-
P4
-
8
-
jdk1.8.0_b64
To reproduce
1. Click on menu button. popup will appear very quickly
2. Click again. Nothing will happe
3. Click third time. Now it will open
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.MenuButton;
import javafx.scene.control.MenuItem;
import javafx.scene.layout.HBox;
import javafx.stage.Stage;
public class BugMenuButton extends Application {
@Override
public void start(Stage primaryStage) {
MenuButton menuButton = new MenuButton("Menu button");
for(int i = 1; i <= 5; i++) {
menuButton.getItems().add(new MenuItem("Item - " + i));
}
HBox root = new HBox(20d);
root.getChildren().add(menuButton);
Scene scene = new Scene(root, 300, 250);
primaryStage.setScene(scene);
primaryStage.setTitle(System.getProperty("java.runtime.version") + "; " + System.getProperty("javafx.runtime.version"));
primaryStage.show();
}
public static void main(String[] args) {
launch(args);
}
}
1. Click on menu button. popup will appear very quickly
2. Click again. Nothing will happe
3. Click third time. Now it will open
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.MenuButton;
import javafx.scene.control.MenuItem;
import javafx.scene.layout.HBox;
import javafx.stage.Stage;
public class BugMenuButton extends Application {
@Override
public void start(Stage primaryStage) {
MenuButton menuButton = new MenuButton("Menu button");
for(int i = 1; i <= 5; i++) {
menuButton.getItems().add(new MenuItem("Item - " + i));
}
HBox root = new HBox(20d);
root.getChildren().add(menuButton);
Scene scene = new Scene(root, 300, 250);
primaryStage.setScene(scene);
primaryStage.setTitle(System.getProperty("java.runtime.version") + "; " + System.getProperty("javafx.runtime.version"));
primaryStage.show();
}
public static void main(String[] args) {
launch(args);
}
}