icepdf
icepdf copied to clipboard
JavaFX Cannot Get Focus In TextFields
I am running PdfFXViewer.java with no modifications and it works fine. However, when I add something else to the BorderPane I can no longer get focus inside of the icepdf Panels. I tried both OpenJDK11 /w OpenFX11 and JDK1.8.
For example add in PdfFXViewer.java:
@Override
public void start(Stage primaryStage) throws Exception {
BorderPane borderPane = new BorderPane();
Scene scene = new Scene(borderPane);
//////////////////////////////////////////////////////////////////////////////
//Add something else to the BorderPane
HBox hbox = new HBox();
TextField tf = new TextField(); //(javafx textfield)
hbox.getChildren().add(tf);
borderPane.setTop(hbox);
//////////////////////////////////////////////////////////////////////////////
// add viewer content pane
createViewer(borderPane);
It is like JavaFX is no longer giving up Focus over to Swing or something is throwing an Exception that is getting eaten in the background. I tried turning on logging without much success. If anyone has any ideas I'm all ears!
Thanks!