javafx-2

javafx webview not supporting Ajax web features

不羁的心 提交于 2020-02-01 04:58:05
问题 I am trying to open webpage in webview using JavaFx . Its opening the web page properly but its not supporting the Ajax based web features like partial refreshing and new window popup handling I am using the following code final Group group= new Group(); Scene scene= new Scene(group); fxpanel.setScene(scene); WebView webview = new WebView (); group.getChildren().add(webview); eng= webview.getEngine(); eng.setJavaScriptEnabled(true); try{ String url="http://www.abc.com"; eng.load(url); eng

java - open url in chrome browser only

本秂侑毒 提交于 2020-01-29 13:29:31
问题 I have an url, I am trying to open that url in web view of JavaFX but the content was not compatible with web view. It's only compatible to the chrome and firefox. So I would like to open that Url in chrome browser only instead of opening it in web view. is it possible?(I don't want to open it in default browser.) I tried the below code but we got the error as "Cannot run program "chrome": error=2, No such file or directory". Runtime.getRuntime().exec(new String[] { "Chrome", "http://goo.gl

Is there a way to compile / load fxml files faster and only one time, and not at every restart of an application?

时光毁灭记忆、已成空白 提交于 2020-01-27 18:43:33
问题 I have a program which loads many fxml files when executed. The application will be finished in a short time, and loading the application just takes too long. There are many fxml files (20+) and all these fxml files are loaded with Java code. There will be a point that the application is finished and ready for use, but all files will be loaded with every execution of the program. Can the fxml files only be compiled once, because they won't be changed when finished? The java code will of

Is there a way to compile / load fxml files faster and only one time, and not at every restart of an application?

时光毁灭记忆、已成空白 提交于 2020-01-27 18:35:38
问题 I have a program which loads many fxml files when executed. The application will be finished in a short time, and loading the application just takes too long. There are many fxml files (20+) and all these fxml files are loaded with Java code. There will be a point that the application is finished and ready for use, but all files will be loaded with every execution of the program. Can the fxml files only be compiled once, because they won't be changed when finished? The java code will of

JavaFx: How to keep the window maximizing?

十年热恋 提交于 2020-01-25 12:49:25
问题 My app, if I click the "maximize button", it will maximize the window. But if I go to another scene(in the same stage), the window will restore to the original size. So, how can I control it to keep maximizing? 回答1: I used primaryStage.setMaximized(true); after calling show(); method in Java 8 implementation. It keeps other scenes maximizing. 回答2: I had the same problem. I fixed it creating a root stage with that only contains a menu bar and a tool bar, like this: I initialized this window in

Netbeans JavaFX 2.0 Application

落花浮王杯 提交于 2020-01-25 05:54:29
问题 I'm developing a JavaFX 2.0 application using NetBeans, and I'm trying to deploy my application into a jar file. I also need some external jars to be added. The build is made using ant which comes with Netbeans. Finally the manifest file looks like this: Manifest-Version: 1.0 Ant-Version: Apache Ant 1.8.2 Created-By: 1.6.0_25-b06 (Sun Microsystems Inc.) Implementation-Vendor: iulia Implementation-Title: NewVersionV3 Implementation-Version: 1.0 Main-Class: com/javafx/main/Main JavaFX

Periodically refresh data

孤街醉人 提交于 2020-01-24 12:03:25
问题 I want to display data periodically but I get error when I try to display the data. Timeline fiveSecondsWonder = new Timeline(new KeyFrame(Duration.seconds(3), new EventHandler<ActionEvent>() { @Override public void handle(ActionEvent event) { GridPane gp = new GridPane(); gp.setPadding(new Insets(10, 10, 10, 10)); gp.setHgap(20); gp.setVgap(10); //gp.setGridLinesVisible(true); gp.add(new Label("Operating System Name"), 0, 0); gp.add(new Label(System.getProperty("os.name")), 1, 0); gp.add(new

showing an error when running javaFx application

Deadly 提交于 2020-01-24 09:34:38
问题 I am running a javaFx application. When I click on some buttons it show the following error: Can't create transparent stage, because your screen doesn't support alpha channel. You need to enable XComposite extension. I am not able to find the problem. I almost spent an hour but still no output. Please help. Thanks on advance! 回答1: It's a known issue for Linux systems without XComposite extension installed: https://javafx-jira.kenai.com/browse/RT-19700 Unfortunately you need to install

showing an error when running javaFx application

我与影子孤独终老i 提交于 2020-01-24 09:34:05
问题 I am running a javaFx application. When I click on some buttons it show the following error: Can't create transparent stage, because your screen doesn't support alpha channel. You need to enable XComposite extension. I am not able to find the problem. I almost spent an hour but still no output. Please help. Thanks on advance! 回答1: It's a known issue for Linux systems without XComposite extension installed: https://javafx-jira.kenai.com/browse/RT-19700 Unfortunately you need to install

How To Align Ok Button Of A Dialog Pane In Javafx?

橙三吉。 提交于 2020-01-24 04:23:30
问题 I want to align i.e Position CENTER an OK button of a DialogPane. I have tried the below code but its not working. Dialog dialog = new Dialog(); DialogPane dialogPane = dialog.getDialogPane(); dialogPane.setStyle("-fx-background-color: #fff;"); // Set the button types. ButtonType okButtonType = new ButtonType("Ok", ButtonBar.ButtonData.OK_DONE); ButtonType cancelButtonType = new ButtonType("Cancel", ButtonBar.ButtonData.CANCEL_CLOSE); dialog.getDialogPane().getButtonTypes().addAll