-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
8u60
-
x86
-
windows_10
FULL PRODUCT VERSION :
java -version
java version "1.8.0_60"
Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
Java HotSpot(TM) Client VM (build 25.60-b23, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Windows10
EXTRA RELEVANT SYSTEM CONFIGURATION :
I use the 32 bits (x86) version of jdk.
A DESCRIPTION OF THE PROBLEM :
ComboBox and other Javafx controls are KO with Windows10.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Compile and launch the attached example. And observe that combobox is frozen.
On widows 7-8, it works, not on windows10
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package comboboxwindows10;
import javafx.application.Application;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.ComboBox;
import javafx.scene.input.MouseEvent;
import javafx.scene.layout.VBox;
import javafx.stage.Stage;
import javafx.util.StringConverter;
/**
*
* @author bruno
*/
public class ComboBoxWindows10 extends Application {
enum Bruno {
Brno, ornB, Bruno
};
@Override
public void start(Stage primaryStage) {
Button btn = new Button();
btn.setText("Say 'Hello World'");
btn.setOnAction(new EventHandler<ActionEvent>() {
@Override
public void handle(ActionEvent event) {
System.out.println("Hello World!");
}
});
ComboBox<Bruno> combo = new ComboBox<>();
combo.getItems().addAll(Bruno.Brno, Bruno.Bruno, Bruno.ornB);
combo.addEventHandler(MouseEvent.MOUSE_PRESSED, (javafx.scene.input.MouseEvent event) -> {
combo.requestFocus();
});
combo.setConverter(new StringConverter<Bruno>() {
@Override
public String toString(Bruno t) {
return t.toString();
}
@Override
public Bruno fromString(String string) {
throw new UnsupportedOperationException();
}
});
VBox root = new VBox();
root.getChildren().addAll(btn, combo);
Scene scene = new Scene(root, 300, 250);
primaryStage.setTitle("Hello World!");
primaryStage.setScene(scene);
primaryStage.show();
}
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
launch(args);
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Stay on Windows 7/8. But new machines are already sold with Windows10 and it should work!!!
java -version
java version "1.8.0_60"
Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
Java HotSpot(TM) Client VM (build 25.60-b23, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Windows10
EXTRA RELEVANT SYSTEM CONFIGURATION :
I use the 32 bits (x86) version of jdk.
A DESCRIPTION OF THE PROBLEM :
ComboBox and other Javafx controls are KO with Windows10.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Compile and launch the attached example. And observe that combobox is frozen.
On widows 7-8, it works, not on windows10
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package comboboxwindows10;
import javafx.application.Application;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.ComboBox;
import javafx.scene.input.MouseEvent;
import javafx.scene.layout.VBox;
import javafx.stage.Stage;
import javafx.util.StringConverter;
/**
*
* @author bruno
*/
public class ComboBoxWindows10 extends Application {
enum Bruno {
Brno, ornB, Bruno
};
@Override
public void start(Stage primaryStage) {
Button btn = new Button();
btn.setText("Say 'Hello World'");
btn.setOnAction(new EventHandler<ActionEvent>() {
@Override
public void handle(ActionEvent event) {
System.out.println("Hello World!");
}
});
ComboBox<Bruno> combo = new ComboBox<>();
combo.getItems().addAll(Bruno.Brno, Bruno.Bruno, Bruno.ornB);
combo.addEventHandler(MouseEvent.MOUSE_PRESSED, (javafx.scene.input.MouseEvent event) -> {
combo.requestFocus();
});
combo.setConverter(new StringConverter<Bruno>() {
@Override
public String toString(Bruno t) {
return t.toString();
}
@Override
public Bruno fromString(String string) {
throw new UnsupportedOperationException();
}
});
VBox root = new VBox();
root.getChildren().addAll(btn, combo);
Scene scene = new Scene(root, 300, 250);
primaryStage.setTitle("Hello World!");
primaryStage.setScene(scene);
primaryStage.show();
}
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
launch(args);
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Stay on Windows 7/8. But new machines are already sold with Windows10 and it should work!!!
- duplicates
-
JDK-8132897 ComboBox hangs on Windows 10 when clicked while not in focus
- Resolved