javafx

Play video with subtitles in JavaFX 2

我是研究僧i 提交于 2020-01-21 09:13:59
问题 I notice that JavaFX 1 has a SubtitleTrack class for extracting subtitles from video files, but I can't find equivalent functionality in JavaFX 2 (a similarly named class in javafx.scene.media doesn't appear to exist. Is this functionality implemented at all in which case where has it moved to? Or is it planned for a future release? 回答1: I don't think video subtitle support was implemented for JavaFX 2.2. I think the Public API changes to media Tracks feature implements the functionality you

Play video with subtitles in JavaFX 2

99封情书 提交于 2020-01-21 09:13:42
问题 I notice that JavaFX 1 has a SubtitleTrack class for extracting subtitles from video files, but I can't find equivalent functionality in JavaFX 2 (a similarly named class in javafx.scene.media doesn't appear to exist. Is this functionality implemented at all in which case where has it moved to? Or is it planned for a future release? 回答1: I don't think video subtitle support was implemented for JavaFX 2.2. I think the Public API changes to media Tracks feature implements the functionality you

Play video with subtitles in JavaFX 2

喜欢而已 提交于 2020-01-21 09:13:26
问题 I notice that JavaFX 1 has a SubtitleTrack class for extracting subtitles from video files, but I can't find equivalent functionality in JavaFX 2 (a similarly named class in javafx.scene.media doesn't appear to exist. Is this functionality implemented at all in which case where has it moved to? Or is it planned for a future release? 回答1: I don't think video subtitle support was implemented for JavaFX 2.2. I think the Public API changes to media Tracks feature implements the functionality you

Adding values to selected javafx ComboBoxTableCell dynamically

[亡魂溺海] 提交于 2020-01-21 08:57:06
问题 I have a TableView with two columns named Product and Brand. A Product can be of different Brands. Eg. TV has different brands like Samsung, Sony etc. I am showing Brands of a Product in ComboBoxes. This is how i am adding a ComboBoxTableCell for my Brand Column. ObservableList<String> catList = FXCollections.observableArrayList(); categoryCol.setCellFactory(t -> { ComboBoxTableCell comboCell = new ComboBoxTableCell(catList); return comboCell; }); contactTable.getColumns().add(categoryCol);

Replace a node at (row,col) in a JavaFX GridPane

半世苍凉 提交于 2020-01-21 04:54:29
问题 I am making a grid-style game/simulation based on bugs "sensing" and eating food. I am using a gridPane (called worldGrid ) of labels to show the grid of bugs and food. This is obviously going to be constantly updated when a bug moves cells towards food etc. I currently have a function updateGrid(int col, int row, String cellContent) which I want to replace the label at [row,col] with a label that has the new text in cellContent. I have the follow which works worldGrid.add(new Label

JavaFX runtime main method

一世执手 提交于 2020-01-20 08:14:22
问题 The Hello World-Tutorial of JavaFX says: The main() method is not required for JavaFX applications when the JAR file for the application is created with the JavaFX Packager tool, which embeds the JavaFX Launcher in the JAR file. However, it is useful to include the main() method so you can run JAR files that were created without the JavaFX Launcher, such as when using an IDE in which the JavaFX tools are not fully integrated. Also, Swing applications that embed JavaFX code require the main()

JavaFX runtime main method

馋奶兔 提交于 2020-01-20 08:13:48
问题 The Hello World-Tutorial of JavaFX says: The main() method is not required for JavaFX applications when the JAR file for the application is created with the JavaFX Packager tool, which embeds the JavaFX Launcher in the JAR file. However, it is useful to include the main() method so you can run JAR files that were created without the JavaFX Launcher, such as when using an IDE in which the JavaFX tools are not fully integrated. Also, Swing applications that embed JavaFX code require the main()

How to open JavaFX .jar file with JDK 11?

二次信任 提交于 2020-01-18 16:08:35
问题 I created a JavaFX project in IntelliJ. I can run project in IntelliJ. I added below code in Configurations): --module-path ${PATH_TO_FX} --add-modules=javafx.controls,javafx.fxml But the output .jar file of project (made with Artifects) doesn't run. I tested these commands, but didn't get any chance: java --module-path %PATH_TO_FX% --add-modules javafx.controls,javafx.fxml -jar Timer.jar java --module-path %PATH_TO_FX% --add-modules javafx.controls Timer.jar Last error log of command line:

javafx @font-face css error “loadStyleSheetUnprivileged”

时光总嘲笑我的痴心妄想 提交于 2020-01-17 13:59:25
问题 I'm trying to load a custom font in JavaFx css using this method @font-face { font-family: 'Roboto'; src: url('fonts/Roboto-Medium.ttf'); } I've done every thing proper with the correct path but I'm getting this error Nov 28, 2015 4:49:18 PM com.sun.javafx.css.StyleManager loadStylesheetUnPrivileged INFO: Could not load @font-face font [file:/C:/Users/RootUser/Desktop/Java8%20projects/RemoteViewer/out/production/JavaFxApplication/application/fonts/Roboto-Medium.ttf] This is my project

javafx @font-face css error “loadStyleSheetUnprivileged”

梦想的初衷 提交于 2020-01-17 13:59:24
问题 I'm trying to load a custom font in JavaFx css using this method @font-face { font-family: 'Roboto'; src: url('fonts/Roboto-Medium.ttf'); } I've done every thing proper with the correct path but I'm getting this error Nov 28, 2015 4:49:18 PM com.sun.javafx.css.StyleManager loadStylesheetUnPrivileged INFO: Could not load @font-face font [file:/C:/Users/RootUser/Desktop/Java8%20projects/RemoteViewer/out/production/JavaFxApplication/application/fonts/Roboto-Medium.ttf] This is my project