javafx-2

Failed to launch JavaFX application with native bundle exe

人走茶凉 提交于 2020-01-01 05:00:06
问题 I have created a JavaFX application, and created its native bundle using Ant . When I am trying to launch application using Jar from bundle created with double click, it successfully launching my application. But when I am trying double click on MyApplication.exe (say), it throwing JavaFX Launcher Error "Exception while running Application" . I have compared both jre, there are many missing jar, exe, dll and some properties files I found. I have these environment settings - JAVA_HOME -- C:

JavaFX.MediaPlayer over HTTPS?

烈酒焚心 提交于 2020-01-01 04:56:26
问题 I tried to use MediaPlayer to play back a resource defined an HTTPS url, and it says protocol not supported. In the API reference they state FILE/HTTP/JAR are supported protocols (HTTPS not mentioned). Is it possible to somehow use urls via HTTPS? This seems quite a big drawback in my opinion... 回答1: This was fixed for Java 9, and later backported to Java 8. Java 8 update 91 and later should therefore be working with HTTPS URLs without an issue. If you're using an old version of Java that

How to drag an undecorated window (stage) of JavaFX

百般思念 提交于 2020-01-01 04:35:07
问题 I have this undecorated window: public static void initStartPage(final Stage primaryStage) { final Stage startPage = new Stage(); startPage.initStyle(StageStyle.UNDECORATED); //startPage.initOwner(primaryStage); //startPage.toFront(); Scene scene = new Scene(agentsPanel(), 900, 500); startPage.setScene(scene); startPage.show(); } I would like to know how I can make it a draggable undecorated window ? I want to change its position when the user selects the window with the right mouse button

JavaFX IllegalAccessException during FXML load()

若如初见. 提交于 2020-01-01 04:18:15
问题 I have a dialog window that is invoked by the following code ( DialogController is a helper class for using modal dialog windows; it mainly bundles together a controller reference with its window): void handleServicesEdit(ActionEvent event) throws IOException { DCServRecEditor sre = DialogController.<DCServRecEditor>loadFXML( CensusAssistant.RES_FXML_DIALOG_SERVEDIT, CensusAssistant.RES_STRING_SERVEDIT, this.getDialog()); sre.setDialogMode(DB.DBEDIT_MODE_EDIT, tbvService.getItems(),

Generating image at server side using Java FX

陌路散爱 提交于 2020-01-01 00:46:12
问题 Currently I'm working on Jax Rs application and I want to output Base64 encoded image to the client. The client is a mobile device. The mobile device will call this service with some parameters and the server has to draw a bar chart and send it back to the device as a base64 encoded image string. Since java Fx having the required chart libraries, I did a sample using following tutorial. "snapshot" function also worked correctly as expected (to create a image of the screen). http://docs.oracle

Display a ProgressIndicator during an async loading of ListView items

只谈情不闲聊 提交于 2019-12-31 17:25:20
问题 I am trying to display a ProgressIndicator while performing an async background ListView item loading. The behaviour that I desire is: Before start loading the ListView items, display a ProgressIndicator with a indeterminate progress; Asynchronously start loading the ListView items; After the ListView items loading was finished, hide the ProgressIndicator . Here is a ssce of my unsuccessful attempt: public class AsyncLoadingExample extends Application { public static void main(String[] args)

Display a ProgressIndicator during an async loading of ListView items

天涯浪子 提交于 2019-12-31 17:24:43
问题 I am trying to display a ProgressIndicator while performing an async background ListView item loading. The behaviour that I desire is: Before start loading the ListView items, display a ProgressIndicator with a indeterminate progress; Asynchronously start loading the ListView items; After the ListView items loading was finished, hide the ProgressIndicator . Here is a ssce of my unsuccessful attempt: public class AsyncLoadingExample extends Application { public static void main(String[] args)

ComboBox FXML default value

我的梦境 提交于 2019-12-31 12:42:27
问题 How can I set a default value in a ComboBox using FXML? <ComboBox fx:id="cbo_Bacteriologie_Aesculine" prefHeight="21.0" prefWidth="105.0" GridPane.columnIndex="1" GridPane.rowIndex="0"> <items> <FXCollections fx:factory="observableArrayList"> <String fx:value="NVT" /> <String fx:value="Bezig" /> <String fx:value="Positief" /> <String fx:value="Negatief" /> </FXCollections> </items> </ComboBox> I want NVT to be selected by default. I tried adding selected="selected" and such but don't seem to

ComboBox FXML default value

独自空忆成欢 提交于 2019-12-31 12:42:24
问题 How can I set a default value in a ComboBox using FXML? <ComboBox fx:id="cbo_Bacteriologie_Aesculine" prefHeight="21.0" prefWidth="105.0" GridPane.columnIndex="1" GridPane.rowIndex="0"> <items> <FXCollections fx:factory="observableArrayList"> <String fx:value="NVT" /> <String fx:value="Bezig" /> <String fx:value="Positief" /> <String fx:value="Negatief" /> </FXCollections> </items> </ComboBox> I want NVT to be selected by default. I tried adding selected="selected" and such but don't seem to

Java Fx resizing scene to stage

和自甴很熟 提交于 2019-12-31 07:03:11
问题 I searched but could not find anything close to the problem that I am having with Fx. I am using Java Fx/JDK 8 and having problems with resizing the scene(s). The below code below loads only one screen at a time in scene graph, and switches between the screens. The problem is when I resize the stage. The scene is not being resized with the stage. Nothing fancy in FXML files only anchor pane and a few components.Thanks in advance. public class ScreensFramework extends Application { static