Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8111036

Alert isn't shown in Windows

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P2 P2
    • fx2.0
    • fx2.0
    • javafx
    • None
    • Java 1.6, JavaFX 2.0 EA b13, Windows 7, Mac OS X 10.6.6

      Using the source code below, the button's action is never fired in Windows - the alert is not displayed. Works fine on Mac OS X.


      public class HelloButtonsJava extends Application {
          @Override
          public void start() {
              Button btn = new Button("Button");
              btn.setOnAction(new EventHandler<ActionEvent>() {
                  public void handle(ActionEvent actionEvent) {
                      Alert.inform("Button Clicked");
                  }
              });

              VBox vBox = new VBox();
              vBox.setPadding(new Insets(10, 10, 10, 10));
              vBox.getChildren().add(btn);

              Scene scene = new Scene(vBox, 400, 400);
              Stage stage = new Stage();
              stage.setScene(scene);
              stage.setVisible(true);
          }

          public static void main(String[] args) {
              Launcher.launch(HelloButtons.class, args);
          }
      }

            kcr Kevin Rushforth
            diversonjfx Dean Iverson (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: